/* ================================================================
   AustinPay — Main Stylesheet
   Design: Dark/Light SaaS Dashboard, Green accent
================================================================ */

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

/* ── Variables ──────────────────────────────────────────────── */
:root {
  /* Light theme — putih & hijau */
  --bg: #f2fbf5;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-active-bg: rgba(22,163,74,0.15);
  --border: #dcece0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #16c14c;
  --primary-dark: #0ea043;
  --primary-light: #ecfdf3;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #059669;
  --info-light: #ccfbf1;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --sidebar-w: 260px;
  --header-h: 64px;
}

[data-theme="dark"] {
  /* Dark theme — seperti api-docs */
  --bg: #07090f;
  --bg-card: #0e1320;
  --bg-sidebar: #0a0e1a;
  --border: #1e3a2c;
  --text: #e2e8f4;
  --text-muted: #6b7897;
  --primary: #39ff14;
  --primary-dark: #2ecc11;
  --primary-light: rgba(57,255,20,.12);
  --success: #34d399;
  --success-light: rgba(52,211,153,.12);
  --danger: #f87171;
  --danger-light: rgba(248,113,113,.1);
  --warning: #fbbf24;
  --warning-light: rgba(251,191,36,.1);
  --info: #2dd4bf;
  --info-light: rgba(45,212,191,.1);
  --sidebar-text: #6b7897;
  --sidebar-text-active: #e2e8f4;
  --sidebar-active-bg: rgba(74,222,128,.12);
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.3);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
/* [FIX] Efek highlight saat tap di mobile browser sebelumnya pakai warna
   biru default Chrome karena tidak pernah di-override. Disamakan hijau
   (var(--primary)) supaya konsisten dengan tema di semua halaman app. */
* { -webkit-tap-highlight-color: rgba(22,193,76,0.25); }
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16c14c 0%, #0ea043 60%, #052e16 100%);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), #0ea043);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 16px;
  color: #fff;
}
.auth-logo h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.auth-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ── Layout ─────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}
.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), #0ea043);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  color: #fff;
}
.sidebar-logo span { font-size: 15px; font-weight: 700; color: #fff; }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #475569;
  padding: 8px 8px 4px;
  margin-top: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  border-left: none;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0ea043);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  overflow: hidden; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: #64748b; }

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  /* [FIX v2] Percobaan sebelumnya (height:100dvh + overflow-y:auto) ternyata
     bikin efek samping di halaman yang ada elemen lebar seperti chart —
     WebView APK auto-zoom-out seluruh halaman supaya konten muat, sehingga
     topbar & elemen lain ikut mengecil (khusus di halaman dengan chart).
     Solusi lebih aman: cukup pakai "overflow-x: clip" (bukan "hidden").
     Bedanya, "clip" tidak memaksa overflow-y berubah jadi "auto" seperti
     "hidden" (ini "fitur" aneh di spec CSS), jadi halaman tetap discroll
     normal di level body/document seperti semula, dan topbar (position:
     sticky) menempel dengan benar tanpa mengubah ukuran/tinggi konten. */
  overflow-x: clip;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  /* [FIX v3] "position: sticky" ternyata masih bisa gagal menempel di
     WebView APK tergantung kombinasi overflow elemen di atasnya (rawan
     berubah-ubah tiap ada penyesuaian layout lain). Ganti ke "position:
     fixed" relatif ke viewport — ini gak bergantung sama sekali pada
     elemen pembungkus/overflow, dijamin selalu diam di tempat saat
     discroll. Posisinya dikunci sejajar dengan sidebar (left: var(
     --sidebar-w)), lalu di halaman mobile (sidebar jadi dropdown atas)
     otomatis full width lewat media query di bawah. Karena fixed keluar
     dari alur normal, .page-content diberi padding-top setara tinggi
     topbar supaya konten tidak ketutupan. */
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 50;
  gap: 16px;
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  font-size: 16px;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }

.page-content { padding: 24px; padding-top: calc(var(--header-h) + 25px); flex: 1; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.indigo { background: var(--primary-light); }
.stat-icon.green { background: var(--success-light); }
.stat-icon.red { background: var(--danger-light); }
.stat-icon.blue { background: var(--info-light); }
.stat-icon.yellow { background: var(--warning-light); }
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Wallet Hero ────────────────────────────────────────────── */
.wallet-hero {
  background: linear-gradient(135deg, #16c14c 0%, #059669 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.wallet-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.wallet-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.wallet-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 8px; }
.wallet-balance { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.wallet-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14,160,67,.4); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--bg); }
.btn-white { background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2); }
.btn-white:hover { background: rgba(255,255,255,.25); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  color: #fff;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.form-control::placeholder { color: var(--text-muted); }
.input-group { position: relative; }
.input-group .form-control { padding-right: 48px; }
.input-group .form-control.has-2-addons { padding-right: 76px; }
.input-addon {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}
.input-addons {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}
.input-addons .input-addon {
  position: static;
  transform: none;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }

/* ── Tables ─────────────────────────────────────────────────── */
/* [FIX] Sebelumnya header/kolom dipaksa "white-space: normal; word-break:
   break-word" di mobile, sehingga kata seperti "WAKTU" atau "PERCOBAAN"
   terpotong paksa di tengah huruf (jadi "WAKT" / "U") karena kolom tabel
   sama lebar (auto table layout, width:100%) dan tidak cukup ruang untuk
   satu kata utuh. Hasilnya header terlihat berantakan/miring ke kanan.
   Solusi: kolom tetap nowrap (tidak dipecah), dan biarkan .table-wrapper
   yang sudah overflow-x:auto menangani scroll horizontal kalau tabel
   lebih lebar dari layar. Ini jauh lebih rapi drpd memotong kata. */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table { width: 100%; min-width: 560px; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
@media (max-width: 768px) {
  .table th, .table td { padding: 8px 10px; font-size: 12px; }
}
.table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); background: var(--bg); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }
.table-empty { text-align: center; padding: 48px; color: var(--text-muted); }
.table-empty .empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: var(--success-light); color: #065f46; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info { background: var(--info-light); color: #15803d; }
.badge-secondary { background: var(--border); color: var(--text-muted); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert > i:first-child { flex-shrink: 0; margin-top: 1px; }
.alert > span { flex: 1; min-width: 0; }
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-light); color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: var(--info-light); color: #15803d; border: 1px solid #86efac; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(.95);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Paginator ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-nav { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── QR Display ─────────────────────────────────────────────── */
.qr-container {
  text-align: center;
  padding: 32px;
}
.qr-box {
  display: block;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  margin: 0 auto 20px;
}
.qr-box img { display: block; width: 220px; height: 220px; }
.qr-box canvas#qris-final-canvas {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 10px;
  margin: 0 auto;
}
.qr-amount { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.qr-label { font-size: 13px; color: var(--text-muted); }
.qr-timer { font-size: 18px; font-weight: 700; color: var(--warning); margin: 12px 0; }
.qr-status-polling { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--text-muted); font-size: 13px; margin-top: 16px; }
.polling-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s ease infinite; }

/* ── Chart wrapper ──────────────────────────────────────────── */
.chart-wrapper { position: relative; height: 220px; }
/* [FIX] Canvas Chart.js kalau tanpa batasan CSS bisa punya lebar intrinsik
   (atribut width, bukan CSS) lebih besar dari layar di device tertentu,
   yang berpotensi memicu WebView APK auto-zoom-out seluruh halaman supaya
   konten muat (efeknya semua elemen termasuk topbar ikut mengecil). Kunci
   canvas supaya tidak pernah melebihi lebar wadahnya. */
.chart-wrapper canvas { max-width: 100%; width: 100% !important; display: block; }
.chart-legend-custom {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-top: 12px;
}
.chart-legend-item {
  font-size: 12px; font-weight: 600;
  cursor: pointer; user-select: none;
  transition: color var(--transition);
}

/* ── Withdraw Grid ──────────────────────────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.method-btn {
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
}
.method-btn:hover { border-color: var(--primary); color: var(--primary); }
.method-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.wallet-logo {
  width: 34px; height: 34px; margin: 0 auto 6px;
  border-radius: 14px 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; letter-spacing: -.02em;
  line-height: 1; text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: flex-start; gap: 10px;
  animation: slideIn .3s ease;
  font-size: 13px;
  border-left: 3px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* ── Notification Bell + Panel ──────────────────────────────── */
.notif-bell-wrapper { position: relative; display: inline-flex; }
.notif-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px;
  display: none; align-items: center; justify-content: center;
  line-height: 1; border: 2px solid var(--bg-card);
}
.notif-panel {
  position: fixed;
  width: 340px; max-width: calc(100vw - 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  opacity: 0; transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.notif-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px;
}
.notif-mark-all {
  background: none; border: none; color: var(--primary);
  font-size: 11.5px; cursor: pointer; font-weight: 600;
}
.notif-panel-list { max-height: 380px; overflow-y: auto; }
.notif-empty { text-align: center; padding: 36px 16px; color: var(--text-muted); font-size: 13px; }
.notif-empty i { font-size: 28px; display: block; margin-bottom: 8px; opacity: .5; }
.notif-item {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--primary-light); }
.notif-item-icon {
  width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; background: var(--info);
}
.notif-item-icon.success { background: var(--success); }
.notif-item-icon.warning { background: var(--warning); }
.notif-item-icon.danger { background: var(--danger); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.notif-item-msg { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; word-break: break-word; }
.notif-item-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Customer Service popover (Live Chat / WhatsApp / Telegram) ── */
.cs-panel {
  position: fixed;
  width: 300px; max-width: calc(100vw - 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  opacity: 0; transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.cs-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cs-panel-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px;
}
.cs-panel-list { padding: 6px; }
.cs-panel-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s;
}
.cs-panel-item:hover { background: var(--bg); }
a.cs-panel-item { text-decoration: none; color: inherit; }
.cs-panel-icon {
  width: 38px; height: 38px; min-width: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; background: var(--primary);
}
.cs-panel-icon.whatsapp { background: #25d366; }
.cs-panel-icon.telegram { background: #229ed9; }
.cs-panel-body { flex: 1; min-width: 0; }
.cs-panel-title { font-size: 13.5px; font-weight: 700; }
.cs-panel-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.cs-panel-arrow { font-size: 11px; color: var(--text-muted); }

/* CS chat window dipindah ke kiri-bawah supaya tidak tumpang tindih
   dengan FAB "Live Chat Member" (komunitas publik) di kanan-bawah. */
#cs-chat-window { right: auto; left: 20px; z-index: 9993; }
@media (max-width: 480px) {
  #cs-chat-window { left: 8px; right: 8px; width: auto; }
}

/* ── Live Chat FAB + Window ──────────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 22px; right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0ea043);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(22,163,74,.45);
  z-index: 9990;
  transition: transform .15s ease;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab .chat-fab-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px;
  display: none; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.chat-fab .chat-fab-online {
  position: absolute; bottom: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--success); border: 2px solid var(--bg);
}

.chat-window {
  position: fixed;
  bottom: 90px; right: 20px;
  width: 360px; height: 520px;
  max-height: calc(100vh - 110px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  z-index: 9991;
  opacity: 0; transform: translateY(16px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  overflow: hidden;
}
.chat-window.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-window-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary), #0ea043);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.chat-window-header-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.chat-window-header-sub { font-size: 11px; opacity: .85; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.chat-online-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
.chat-window-close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}
.chat-msg { display: flex; gap: 8px; max-width: 88%; align-items: flex-start; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-avatar {
  width: 28px; height: 28px; min-width: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0ea043);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; overflow: hidden;
}
.chat-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-msg-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.chat-msg.mine .chat-msg-body { align-items: flex-end; }
.chat-msg-name { font-size: 11px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.chat-msg-name .admin-tag { background: var(--primary); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 4px; font-weight: 700; }
.chat-bubble {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  /* [FIX] Bubble sebelumnya bisa membesar tidak wajar kalau pesan
     mengandung banyak baris kosong/spasi berturut-turut (white-space:
     pre-wrap ikut merender semuanya). Server sudah merapikan whitespace
     saat pesan disimpan, dan di sisi tampilan kita batasi tinggi
     maksimal supaya bubble tetap pas dengan teksnya, bukan melebar
     kosong. */
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 13px; line-height: 1.45;
  word-break: break-word; white-space: pre-wrap;
  position: relative;
}
.chat-msg.mine .chat-bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.chat-msg-time { font-size: 10px; color: var(--text-muted); }
.chat-bubble .chat-del-btn {
  display: none; position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff; border: none;
  font-size: 10px; cursor: pointer; align-items: center; justify-content: center;
}
.chat-bubble:hover .chat-del-btn { display: flex; }

.chat-empty { text-align: center; color: var(--text-muted); font-size: 12.5px; padding: 30px 16px; }
.chat-typing-indicator { font-size: 11px; color: var(--text-muted); padding: 0 16px 4px; min-height: 16px; font-style: italic; }

.chat-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.chat-input-row textarea {
  flex: 1; resize: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 9px 14px;
  font-size: 13px;
  max-height: 80px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.chat-input-row textarea:focus { outline: none; border-color: var(--primary); }
.chat-send-btn {
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
}
.chat-send-btn:disabled { opacity: .5; cursor: not-allowed; }

.chat-connection-banner {
  font-size: 11px; text-align: center; padding: 5px;
  background: var(--warning-light); color: #92400e;
  display: none;
}
.chat-connection-banner.show { display: block; }

@media (max-width: 480px) {
  .chat-window {
    bottom: 0; right: 0; left: 0;
    width: 100%; height: 100%; max-height: 100%;
    border-radius: 0;
  }
  .chat-fab { bottom: 18px; right: 16px; }
}

/* ── Tiket Admin (window reuses .chat-window, list + thread view) ── */
.ticket-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.ticket-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.ticket-list-item:hover { background: var(--bg-hover, var(--bg)); }
.ticket-list-item-icon {
  width: 34px; height: 34px; min-width: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; background: var(--primary);
}
.ticket-list-item-body { flex: 1; min-width: 0; }
.ticket-list-item-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-list-item-sub { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ticket-status-badge {
  font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .3px; flex-shrink: 0;
}
.ticket-status-badge.open { background: #dcfce7; color: #15803d; }
.ticket-status-badge.closed { background: #f1f5f9; color: #64748b; }
.ticket-new-btn {
  margin: 8px; padding: 10px; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ticket-back-btn { background: rgba(255,255,255,.18); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px; margin-right: 6px; }
.ticket-attach-btn {
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
  background: var(--bg); color: var(--text-muted); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
}
.chat-msg-image { max-width: 200px; border-radius: 10px; display: block; cursor: pointer; margin-bottom: 4px; }
.ticket-image-preview { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--bg-card); }
.ticket-image-preview img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.ticket-image-preview button { margin-left: auto; background: none; border: none; color: var(--danger); cursor: pointer; font-size: 13px; }
.ticket-subject-input { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin: 8px 8px 0; background: var(--bg); color: var(--text); }
.ticket-closed-banner { font-size: 11.5px; text-align: center; padding: 8px; color: var(--text-muted); background: var(--bg-card); border-top: 1px solid var(--border); }

/* ── Sidebar toggle (mobile) ─────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

/* ── Misc ───────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity:1; } 50% { transform: scale(1.5); opacity:.6; } }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* [UPDATE] Sidebar mobile sekarang berupa dropdown menu dari ATAS,
     bukan panel penuh dari kiri. Tinggi mengikuti isi menu saja (tidak
     full layar), dan warnanya ikut tema aktif:
       - Tema terang → biru & putih (var(--bg-card) + border halus)
       - Tema gelap  → hitam seperti sebelumnya (var(--bg-sidebar))
     Posisi diubah dari fixed kiri-penuh menjadi fixed top, lebar penuh,
     tinggi otomatis, dengan animasi slide-down/up. */
  .sidebar {
    top: 0; left: 0; right: 0; bottom: auto;
    width: 100%;
    height: auto;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform var(--transition), opacity var(--transition);
    opacity: 0;
    pointer-events: none;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .sidebar.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* [UPDATE] Background sidebar mobile ikut tema (sebelumnya selalu
     --bg-sidebar gelap di kedua tema). Tema terang → kartu putih dengan
     aksen biru; tema gelap → tetap hitam seperti desain semula. */
  .sidebar { background: var(--bg-card); }
  [data-theme="dark"] .sidebar { background: var(--bg-sidebar); }

  /* Teks & elemen sidebar menyesuaikan supaya tetap kontras di tema terang
     (sebelumnya warna teks di-hardcode putih karena background selalu gelap) */
  .sidebar-logo span { color: var(--text); }
  .sidebar-header { border-bottom: 1px solid var(--border); }
  .sidebar-footer { border-top: 1px solid var(--border); }
  .nav-item { color: var(--text-muted); }
  .nav-item:hover { background: var(--primary-light); color: var(--text); }
  .nav-item.active { color: var(--primary); }
  .sidebar-user:hover { background: var(--primary-light); }
  .sidebar-user-name { color: var(--text); }

  .main-content { margin-left: 0; }
  .topbar { left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .wallet-balance { font-size: 28px; }
  .page-content { padding: 16px; padding-top: calc(var(--header-h) + 17px); }
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    display: none;
  }
  .sidebar-overlay.open { display: block; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Font Awesome icon adjustments ──────────────────────────── */
.logo-icon i,
.sidebar-logo .logo-icon i,
.auth-logo .logo-icon i {
  font-size: inherit;
  color: #fff;
  line-height: 1;
}
/* stat-icon: show color from icon itself */
.stat-icon {
  color: transparent; /* hide any leftover text */
}
.stat-icon i {
  font-size: 20px;
  line-height: 1;
}
.stat-icon.green i { color: var(--success); }
.stat-icon.red i   { color: var(--danger); }
.stat-icon.blue i  { color: var(--info); }
.stat-icon.yellow i { color: var(--warning); }
.stat-icon.indigo i { color: var(--primary); }
/* nav icons inherit sidebar text color */
.nav-icon i {
  font-size: 14px;
  line-height: 1;
  color: inherit;
}
.btn-icon i { font-size: 15px; line-height: 1; }
.sidebar-toggle i { font-size: 18px; color: var(--text); }
/* landing feature icons */
.feature-icon i { font-size: 18px; line-height: 1; }

/* ── Profile Grid ───────────────────────────────────────────── */
#profile-grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 860px) {
  #profile-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

/* ── Dashboard: Marquee sambutan ────────────────────────────── */
.dash-marquee {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dash-marquee-icon { color: var(--primary); font-size: 12px; flex-shrink: 0; }
.dash-marquee-track {
  display: flex;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.dash-marquee-text {
  display: inline-block;
  padding-right: 48px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--success);
  animation: dashMarqueeScroll 18s linear infinite;
}
@keyframes dashMarqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ── Dashboard: Announcement banner ─────────────────────────── */
.dash-announcement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.dash-announcement i { margin-top: 2px; flex-shrink: 0; }
.dash-announcement-info    { background: var(--info-light);    color: var(--info);    border-color: var(--info); }
.dash-announcement-success { background: var(--success-light); color: var(--success); border-color: var(--success); }
.dash-announcement-warning { background: var(--warning-light); color: var(--warning); border-color: var(--warning); }
.dash-announcement-danger  { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger); }
.dash-announcement span { color: var(--text); }

/* ── Modal Informasi Layanan: item list ─────────────────────── */
.info-banner-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.info-banner-item:last-child { margin-bottom: 0; }
.info-banner-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.info-banner-message {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
}
.info-banner-date {
  font-size: 11px;
  color: var(--text-muted);
  opacity: .7;
  margin-top: 8px;
}

/* ── Tombol "Unduh Aplikasi Android" (halaman login/daftar) ──── */
.divider-dashed { height: 0; background: none; border-top: 1px dashed var(--border); }
.btn-apk {
  background: var(--primary-light);
  color: #0b7a34;
  border: 1px solid var(--border);
  text-decoration: none;
}
.btn-apk:hover { background: var(--success-light); transform: translateY(-1px); }
.btn-apk i { font-size: 18px; }
[data-theme="dark"] .btn-apk { color: var(--primary); }

/* ── Banner ke-2: ajakan gabung WhatsApp Channel ─────────────── */
.channel-modal { position: relative; max-width: 420px; padding: 30px 24px 22px; text-align: center; }
.channel-modal-x {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--text-muted); cursor: pointer;
}
.channel-modal-icon {
  width: 76px; height: 76px; margin: 2px auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: #25d366;
  background: rgba(37,211,102,.14);
  box-shadow: 0 0 0 8px rgba(37,211,102,.07);
}
.channel-modal-title { font-size: 18px; font-weight: 800; line-height: 1.3; margin: 0 0 8px; color: var(--text); }
.channel-modal-text { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 16px; }
.channel-modal-perk {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  padding: 12px 14px; margin-bottom: 18px;
  border: 1.5px dashed #25d366; border-radius: var(--radius-sm);
  background: rgba(37,211,102,.07);
}
.channel-modal-perk > i { font-size: 22px; color: #25d366; margin-top: 2px; }
.channel-modal-perk-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #128c4a; }
.channel-modal-perk-text { font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--text); margin-top: 2px; }
[data-theme="dark"] .channel-modal-perk-label { color: #4ade80; }
.channel-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.channel-modal-actions .btn { flex: 1 1 calc(50% - 5px); text-decoration: none; justify-content: center; }
.channel-modal-actions .btn-outline { flex-basis: 100%; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover:not(:disabled) { background: #1fb457; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,.4); }
[data-theme="dark"] .btn-wa { color: #04210a; }

/* ── Notifikasi mengambang: install aplikasi Android ─────────── */
.apk-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  width: calc(100% - 24px); max-width: 420px;
  z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  transform: translate(-50%, -160%);
  opacity: 0; pointer-events: none;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.15), opacity .25s ease;
  touch-action: none;            /* geser horizontal/atas ditangani JS */
  user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.apk-toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.apk-toast.dragging { transition: none; cursor: grabbing; }
.apk-toast-install {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background var(--transition);
}
.apk-toast-install:hover { background: var(--primary-dark); }
.apk-toast-install i { font-size: 16px; }
[data-theme="dark"] .apk-toast-install { color: #04210a; }
.apk-toast-text { min-width: 0; flex: 1; }
.apk-toast-title { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.apk-toast-sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Checkbox "Percaya perangkat ini" (login & registrasi) */
.trust-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  line-height: 1.35; user-select: none; -webkit-user-select: none;
}
.trust-check input[type="checkbox"] {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
  accent-color: var(--primary); cursor: pointer;
}
.trust-check small {
  display: block; margin-top: 2px;
  font-size: 12px; font-weight: 400; color: var(--text-muted);
}
