/* ==========================================================================
   Nusantara LeadMaps — style.css
   B2B Google Maps Lead Scraper & Prospect Finder
   by Artha Karya Nusantara — https://artha-karya-nusantara.web.id
   Tema: Light Mode Modern (Emerald & Gold)
   ========================================================================== */

:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --surface-3: #F8FAFC;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-soft: #475569;
  --text-muted: #64748B;

  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-soft: #ECFDF5;
  --emerald-border: #A7F3D0;

  --gold: #D97706;
  --gold-dark: #B45309;
  --gold-soft: #FFFBEB;
  --gold-border: #FDE68A;

  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --danger-border: #FECACA;
  --slate: #334155;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 2px 6px -2px rgba(15, 23, 42, .10);
  --shadow: 0 12px 28px -18px rgba(15, 23, 42, .25);
  --shadow-lg: 0 24px 48px -28px rgba(15, 23, 42, .30);

  --radius-lg: 16px;
  --radius: 13px;
  --radius-sm: 9px;

  --font-head: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', monospace;

  --header-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 12% -12%, #ECFDF5 0%, rgba(236, 253, 245, 0) 62%),
    radial-gradient(900px 460px at 96% 0%, #FFFBEB 0%, rgba(255, 251, 235, 0) 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, strong { font-family: var(--font-head); }

a { color: var(--emerald-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--font-mono); }

::selection { background: var(--emerald-soft); color: var(--emerald-dark); }

/* Scrollbar halus */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #94A3B8; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ============================ HEADER ============================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1680px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 10px clamp(14px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--emerald) 0%, #10B981 52%, var(--gold) 130%);
  box-shadow: 0 10px 20px -12px rgba(5, 150, 105, .75);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.22; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.brand-text small { color: var(--text-muted); font-size: 11.5px; font-family: var(--font-body); }

.header-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  white-space: nowrap;
}
.pill-soft { font-family: var(--font-mono); font-size: 11px; }

/* --- Status sesi pengguna di header (produksi) --- */
.auth-guest { display: inline-flex; align-items: center; }

.auth-user { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--emerald-border);
  background: var(--emerald-soft);
  color: var(--emerald-dark);
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.user-chip:hover { background: #D1FAE5; border-color: var(--emerald); }
.user-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--emerald-border); }
.user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill-ok { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.pill-warn { background: var(--gold-soft); border-color: var(--gold-border); color: var(--gold-dark); }
.pill-err { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
  background: var(--surface);
  color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--emerald) 0%, #0EA672 100%);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(5, 150, 105, .95);
}
.btn-primary:hover:not([disabled]) { background: linear-gradient(135deg, var(--emerald-dark) 0%, #059669 100%); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #F59E0B 100%);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(217, 119, 6, .95);
}
.btn-gold:hover:not([disabled]) { background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%); }

.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover:not([disabled]) { background: #FEE2E2; }

.btn-outline { background: var(--surface); color: var(--emerald-dark); border-color: var(--emerald-border); }
.btn-outline:hover:not([disabled]) { background: var(--emerald-soft); }

.btn-ghost { background: var(--surface-2); color: var(--text-soft); border-color: var(--border); }
.btn-ghost:hover:not([disabled]) { background: #E8EEF6; color: var(--text); }

.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ============================ APP SHELL ============================ */
.app-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px clamp(14px, 3vw, 28px) 6px;
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 14px);
  max-height: calc(100vh - var(--header-h) - 28px);
  overflow-y: auto;
  padding-right: 4px;
}

.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; }
}
/* ============================ PANEL ============================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 13px;
}
.panel-head h2 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.15px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.panel-hint { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.panel-hint-btn {
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 3px 9px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; color: var(--text-soft);
}
.panel-hint-btn:hover { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }

.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.dot-emerald { background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.dot-gold { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* ============================ FORM FIELDS ============================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 12px; font-weight: 700; color: var(--text-soft); font-family: var(--font-head); }
.field label em { font-style: normal; font-weight: 500; color: var(--text-muted); font-size: 11px; }
.field-help { font-size: 11px; color: var(--text-muted); }
.field-help code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; font-size: 10.5px; }

input[type="text"], input[type="url"], input[type="number"], input[type="search"], textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
textarea { resize: vertical; min-height: 46px; line-height: 1.5; }
textarea, input[type="number"] { font-family: var(--font-mono); font-size: 12.5px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .13);
}
::placeholder { color: #94A3B8; }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  font-size: 12.5px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2 .field { margin-bottom: 12px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  border: 1px dashed var(--border-strong);
  background: var(--surface-3);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-style: solid; border-color: var(--emerald); color: var(--emerald-dark); background: var(--emerald-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.actions .btn-primary { flex: 1 1 150px; }
/* ============================ FILTER SWITCH CARDS ============================ */
.filter-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.switch-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  cursor: pointer;
  transition: all .16s ease;
}
.switch-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.switch-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui {
  flex: 0 0 auto;
  width: 34px; height: 19px;
  border-radius: 999px;
  background: #CBD5E1;
  position: relative;
  transition: background .18s ease;
}
.switch-ui::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease;
}
.switch-text { display: flex; flex-direction: column; line-height: 1.3; }
.switch-text strong { font-size: 12.5px; font-weight: 700; color: var(--text); }
.switch-text small { font-size: 10.5px; color: var(--text-muted); }

.switch-card input:checked + .switch-ui { background: var(--emerald); }
.switch-card input:checked + .switch-ui::after { transform: translateX(15px); }
.switch-card input:focus-visible + .switch-ui { outline: 2px solid var(--emerald); outline-offset: 2px; }
.switch-card:has(input:checked) {
  border-color: var(--emerald-border);
  background: var(--emerald-soft);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .08);
}
.switch-card:has(input:checked) .switch-text small { color: var(--emerald-dark); }

/* ============================ AUTH MODAL (MULTI-LANGKAH) ============================ */
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-alert {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-soft);
  padding: 9px 12px;
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.auth-alert.is-info { background: var(--surface-2); border-color: var(--border); color: var(--text-soft); }
.auth-alert.is-success { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.auth-alert.is-warning { background: var(--gold-soft); border-color: var(--gold-border); color: var(--gold-dark); }
.auth-alert.is-error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }

.link-btn {
  border: none; background: none; cursor: pointer;
  color: var(--emerald-dark);
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  padding: 4px 0;
  text-align: left;
}
.link-btn:hover { text-decoration: underline; }

.auth-separator {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0;
  color: var(--text-muted); font-size: 11px; font-family: var(--font-mono);
}
.auth-separator::before, .auth-separator::after {
  content: ''; flex: 1 1 auto; height: 1px; background: var(--border);
}

.google-signin-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-height: 44px; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn-google:hover { background: var(--surface-2); border-color: var(--slate); box-shadow: var(--shadow-xs); }

.field-otp { align-items: center; }
.otp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 10px;
  padding: 13px 10px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  border-color: var(--gold-border);
}
.otp-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 119, 6, .16); }
.otp-target { margin: 0 0 12px; font-size: 12.5px; color: var(--text-muted); }
.otp-target strong { font-family: var(--font-mono); color: var(--emerald-dark); }
.otp-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ============================ HISTORY ============================ */
.history-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  padding: 7px 9px;
  transition: all .15s ease;
}
.history-item:hover { border-color: var(--emerald-border); background: var(--emerald-soft); }
.history-main { min-width: 0; display: flex; flex-direction: column; }
.history-main b {
  font-size: 12px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px;
}
.history-main span { font-size: 10.5px; color: var(--text-muted); font-family: var(--font-mono); }
.history-load {
  border: 1px solid var(--emerald-border);
  background: var(--surface);
  color: var(--emerald-dark);
  font-size: 10.5px; font-weight: 700; font-family: var(--font-head);
  padding: 4px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.history-load:hover { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.history-empty { font-size: 11.5px; color: var(--text-muted); padding: 10px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
/* ============================ STAT CARDS ============================ */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1080px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px 15px;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card::before {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--emerald) 0%, #34D399 100%);
  opacity: .9;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); letter-spacing: .1px; }
.stat-icon {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px;
}
.stat-icon-emerald { background: var(--emerald-soft); color: var(--emerald-dark); border: 1px solid var(--emerald-border); }
.stat-icon-gold { background: var(--gold-soft); color: var(--gold-dark); border: 1px solid var(--gold-border); }
.stat-icon-slate { background: var(--surface-2); color: var(--slate); border: 1px solid var(--border); }
.stat-value { font-size: 27px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.stat-value-gold { color: var(--gold-dark); }
.stat-value-emerald { color: var(--emerald-dark); }
.stat-foot { font-size: 11px; color: var(--text-muted); }
#cardNoWebsite::before { background: linear-gradient(180deg, var(--gold) 0%, #FBBF24 100%); }
#cardWhatsapp::before { background: linear-gradient(180deg, #10B981 0%, #6EE7B7 100%); }
#cardDupes::before { background: linear-gradient(180deg, var(--slate) 0%, #94A3B8 100%); }

/* ============================ PROGRESS ============================ */
.progress-panel { padding: 14px 16px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.progress-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); min-width: 0; }
.progress-status span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #CBD5E1; flex: 0 0 auto;
  transition: background .2s ease;
}
.status-dot.is-running { background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }
.status-dot.is-done { background: var(--emerald); }
.status-dot.is-error { background: var(--danger); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .45); }
  50% { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
}
.progress-pct { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--emerald-dark); }

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald) 0%, #34D399 55%, var(--gold) 130%);
  transition: width .25s ease;
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

.progress-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px;
  font-size: 11px; color: var(--text-muted); font-family: var(--font-mono);
  flex-wrap: wrap;
}
.progress-meta em { color: var(--text-soft); font-style: normal; }
/* ============================ RESULTS / TABS ============================ */
.results-panel { padding: 16px; }
.tabs-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.tabs { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 11px; border: 1px solid var(--border); }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; background: transparent; cursor: pointer;
  padding: 8px 13px;
  border-radius: 8px;
  font-family: var(--font-head); font-size: 12.5px; font-weight: 700;
  color: var(--text-muted);
  transition: all .16s ease;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .7); }
.tab.is-active { background: var(--surface); color: var(--emerald-dark); box-shadow: var(--shadow-xs); }
.tabs-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0 9px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1 1 320px; max-width: 520px; }
.search-wrap input { padding-left: 32px; padding-right: 30px; font-family: var(--font-body); font-size: 12.5px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.search-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  border: none; background: var(--surface-2); color: var(--text-muted);
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1;
  display: none; place-items: center; font-size: 14px;
}
.search-wrap.has-value .search-clear { display: grid; }
.search-clear:hover { background: var(--danger-soft); color: var(--danger); }

.toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); font-weight: 600; font-family: var(--font-head); }
.inline-field select { width: auto; min-width: 118px; padding: 6px 26px 6px 9px; }

.filter-info {
  font-size: 11.5px; color: var(--text-soft);
  background: var(--surface-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  margin-bottom: 11px;
  font-family: var(--font-mono);
}
.filter-info b { color: var(--emerald-dark); font-weight: 600; }
.filter-info .warn { color: var(--gold-dark); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
/* ============================ TABLE ============================ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 620px;
  background: var(--surface);
}
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--font-body); font-size: 12.5px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: var(--font-head);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  text-align: left;
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td { padding: 10px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tbody tr:hover { background: #FBFDFF; }
.data-table tbody tr:last-child td { border-bottom: none; }

.col-no { width: 52px; text-align: center; }
.col-rating { width: 100px; }
.col-coord { width: 154px; }
.col-act { width: 108px; }
.col-web { width: 122px; }
.col-phone { width: 152px; }

.place-name { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--text); display: block; }
.place-cat { font-size: 11px; color: var(--text-muted); display: block; margin-top: 1px; }
.place-meta { font-size: 10.5px; color: var(--text-muted); display: block; margin-top: 3px; font-family: var(--font-mono); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  white-space: nowrap;
}
.badge-hp { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.badge-tel { background: var(--surface-2); border-color: var(--border); color: var(--slate); }
.badge-none { background: #FFF7ED; border-color: #FED7AA; color: #C2410C; }
.badge-web-yes { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.badge-web-no { background: var(--gold-soft); border-color: var(--gold-border); color: var(--gold-dark); }
.badge-soft { background: var(--surface-2); color: var(--text-muted); }
.phone-main { font-family: var(--font-mono); font-size: 12px; color: var(--text); display: block; margin-bottom: 4px; }

.rating-pill { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text); }
.rating-pill .star { color: var(--gold); }
.rating-pill .rev { color: var(--text-muted); font-size: 10.5px; font-weight: 400; }

.addr-text { display: block; max-width: 320px; line-height: 1.45; color: var(--text-soft); }
.web-link { display: inline-block; max-width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }

.coord-link {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  padding: 4px 8px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s ease;
}
.coord-link:hover { background: var(--emerald); color: #fff; border-color: var(--emerald); text-decoration: none; }
.coord-na { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.wa-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #16A34A 0%, var(--emerald) 100%);
  color: #fff;
  border: none; cursor: pointer;
  padding: 6px 10px; border-radius: 8px;
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  transition: transform .14s ease, box-shadow .16s ease;
  box-shadow: 0 6px 14px -10px rgba(5, 150, 105, .9);
}
.wa-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 18px -10px rgba(5, 150, 105, .95); }
.wa-btn.is-disabled { background: var(--surface-2); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.row-actions { display: flex; flex-direction: column; gap: 5px; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  border-radius: 7px; padding: 4px 8px; font-size: 10.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font-head);
}
.icon-btn:hover { border-color: var(--emerald-border); color: var(--emerald-dark); background: var(--emerald-soft); }

.empty-row td { padding: 0 !important; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 42px 20px; text-align: center; }
.empty-state strong { font-size: 14px; color: var(--text); }
.empty-state span { font-size: 12px; color: var(--text-muted); max-width: 460px; }
.empty-state em { font-style: normal; color: var(--emerald-dark); font-weight: 600; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted);
}
/* ============================ MAP ============================ */
#map {
  height: 520px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  z-index: 1;
}
.map-legend {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11.5px; color: var(--text-muted);
}
.map-legend #mapCount { margin-left: auto; font-family: var(--font-mono); }
.legend-pin {
  display: inline-block; width: 9px; height: 9px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  margin-right: 6px;
}
.legend-pin-emerald { background: var(--emerald); }
.legend-pin-gold { background: var(--gold); }

.leaflet-container { font-family: var(--font-body) !important; }
.leaflet-popup-content { margin: 12px 14px; font-size: 12.5px; min-width: 210px; }
.leaflet-popup-content strong { font-family: var(--font-head); font-size: 13px; display: block; margin-bottom: 3px; }
.leaflet-popup-content .pop-cat { color: var(--text-muted); font-size: 11px; display: block; margin-bottom: 6px; }
.leaflet-popup-content .pop-row { font-family: var(--font-mono); font-size: 11px; color: var(--text-soft); display: block; margin-bottom: 6px; }
.leaflet-popup-content .pop-links { display: flex; gap: 6px; flex-wrap: wrap; }
.leaflet-popup-content .pop-links a {
  font-size: 11px; font-weight: 700; font-family: var(--font-head);
  padding: 4px 9px; border-radius: 6px; text-decoration: none;
}
.pop-wa { background: var(--emerald); color: #fff; }
.pop-maps { background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }

.map-pin-wrap { background: transparent !important; border: none !important; }
.map-pin {
  width: 16px; height: 16px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px -3px rgba(15, 23, 42, .5);
}
.map-pin-emerald { background: var(--emerald); }
.map-pin-gold { background: var(--gold); }

/* ============================ LOG TERMINAL ============================ */
.log-panel { padding: 16px; }
.log-actions { display: flex; align-items: center; gap: 8px; }
.log-terminal {
  background: #0B1220;
  border: 1px solid #1E293B;
  border-radius: var(--radius);
  padding: 12px 13px;
  height: 268px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: #CBD5E1;
}
.log-line { display: flex; gap: 9px; align-items: baseline; }
.log-time { color: #64748B; flex: 0 0 auto; }
.log-tag {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.tag-info { background: rgba(56, 189, 248, .16); color: #7DD3FC; }
.tag-ok { background: rgba(16, 185, 129, .18); color: #6EE7B7; }
.tag-warn { background: rgba(245, 158, 11, .18); color: #FCD34D; }
.tag-err { background: rgba(239, 68, 68, .18); color: #FCA5A5; }
.tag-data { background: rgba(139, 92, 246, .18); color: #C4B5FD; }
.log-msg { color: #E2E8F0; word-break: break-word; }
.log-line-info .log-msg { color: #CBD5E1; }
.log-line-ok .log-msg { color: #A7F3D0; }
.log-line-warn .log-msg { color: #FDE68A; }
.log-line-err .log-msg { color: #FECACA; }

/* ============================ FOOTER ============================ */
.app-footer {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .7);
}
.footer-inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 28px) 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; line-height: 1.4; }
.footer-brand strong { font-size: 14px; font-weight: 800; }
.footer-brand span { font-size: 11.5px; color: var(--text-muted); }
.footer-note { margin: 0; max-width: 620px; font-size: 11px; color: var(--text-muted); line-height: 1.55; }
.footer-build { font-size: 10.5px; color: var(--text-muted); font-family: var(--font-mono); }

/* ============================ TOAST ============================ */
.toast-stack {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 1200;
  display: flex; flex-direction: column; gap: 9px;
  max-width: min(360px, 92vw);
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--text-soft);
  animation: toast-in .22s ease;
}
.toast strong { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 2px; }
.toast.is-success { border-left-color: var(--emerald); }
.toast.is-warning { border-left-color: var(--gold); }
.toast.is-error { border-left-color: var(--danger); }
.toast.is-hiding { opacity: 0; transform: translateY(6px); transition: all .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================ RESPONSIVE & UTIL ============================ */
@media (max-width: 760px) {
  #map { height: 400px; }
  .tabs-head { flex-direction: column; align-items: stretch; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .tabs-actions .btn { flex: 1 1 auto; }
  .stat-value { font-size: 24px; }
  .table-wrap { max-height: 480px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================ DOMPET TOKEN (WALLET BAR) ============================ */
.wallet-widget { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.pill-wallet {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold-dark);
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  transition: background .16s ease, transform .12s ease, border-color .16s ease;
}
.pill-wallet:hover { background: #FEF3C7; border-color: var(--gold); }
.pill-wallet:active { transform: translateY(1px); }
.pill-wallet strong { font-family: var(--font-mono); font-weight: 700; color: var(--gold-dark); }
.pill-wallet.is-empty { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.pill-wallet.is-empty strong { color: var(--danger); }
.pill-wallet.is-bump { animation: wallet-bump .75s ease; }
.coin-gold { display: inline-flex; align-items: center; }

@keyframes wallet-bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.13); }
  60% { transform: scale(.97); }
  100% { transform: scale(1); }
}

/* ============================ BANNER INFO PRODUKSI ============================ */
.info-banner {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 11px;
  font-size: 11.5px;
  color: var(--emerald-dark);
  line-height: 1.55;
}
.info-banner strong { font-family: var(--font-head); }
.info-banner em { font-style: normal; font-weight: 700; }
.info-banner-tight { margin: 0 0 12px; }
.info-banner-icon {
  flex: 0 0 auto;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 11px; font-weight: 800;
  margin-top: 1px;
}

/* ============================ PANEL KUOTA TOKEN ============================ */
.quota-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12px; color: var(--text-muted);
}
.quota-row strong { font-family: var(--font-mono); font-size: 12.5px; color: var(--gold-dark); }
.quota-row:last-of-type { margin-bottom: 11px; }

/* ============================ MODAL (TOP-UP & AKUN) ============================ */
.modal {
  position: fixed; inset: 0;
  z-index: 1300;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  animation: fade-in .18s ease;
}
.modal-card {
  position: relative; z-index: 1;
  width: min(720px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  animation: modal-in .22s ease;
}
.modal-card-wide { width: min(900px, 100%); }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.modal-head { padding-right: 34px; }
.modal-head h3 { margin: 4px 0 4px; font-size: 19px; letter-spacing: -.3px; }
.modal-eyebrow {
  display: inline-flex; align-items: center;
  font-family: var(--font-head); font-size: 10px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 2px 8px; border-radius: 999px;
}
.modal-sub { margin: 0 0 14px; font-size: 12px; color: var(--text-muted); max-width: 640px; line-height: 1.55; }
.modal-body { display: flex; flex-direction: column; gap: 14px; }
.modal-note {
  margin: 0; font-size: 11.5px; color: var(--text-muted);
  background: var(--surface-3); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px; line-height: 1.5;
}
.modal-note code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; font-size: 10.5px; }

.modal-tabs {
  display: inline-flex; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px; border-radius: 11px;
  margin-bottom: 14px;
}
.modal-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 13px; border-radius: 8px;
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  transition: all .16s ease;
}
.modal-tab:hover { color: var(--text); background: rgba(255, 255, 255, .7); }
.modal-tab.is-active { background: var(--surface); color: var(--emerald-dark); box-shadow: var(--shadow-xs); }

@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ============================ KARTU PAKET TOKEN ============================ */
.package-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }

.package-card {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-3);
  padding: 14px 13px 12px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.package-card:hover { transform: translateY(-2px); border-color: var(--gold-border); background: var(--gold-soft); box-shadow: var(--shadow-sm); }
.package-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.package-card.is-popular { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 119, 6, .10); }
.package-card.is-loading { opacity: .6; pointer-events: none; }

.package-badge {
  position: absolute; top: -9px; right: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, #F59E0B 100%);
  color: #fff;
  font-family: var(--font-head); font-size: 9.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  box-shadow: 0 6px 14px -8px rgba(217, 119, 6, .95);
}
.package-name { font-family: var(--font-head); font-size: 12.5px; font-weight: 700; color: var(--text); }
.package-price { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--gold-dark); letter-spacing: -.4px; }
.package-tokens {
  font-family: var(--font-mono); font-size: 11px; color: var(--emerald-dark);
  background: var(--emerald-soft); border: 1px solid var(--emerald-border);
  border-radius: 999px; padding: 2px 8px; align-self: flex-start;
}
.package-tokens strong { font-size: 11.5px; }
.package-per { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.package-tagline { font-size: 10.5px; color: var(--text-muted); line-height: 1.45; min-height: 30px; }
.package-cta {
  margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--emerald) 0%, #0EA672 100%);
  color: #fff;
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  padding: 7px 10px; border-radius: 8px;
}
.package-card.is-popular .package-cta { background: linear-gradient(135deg, var(--gold) 0%, #F59E0B 100%); }

/* ============================ PANEL PEMBAYARAN QRIS ============================ */
.payment-panel {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}
.qr-box {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
}
#qrisCanvas {
  width: 224px; height: 224px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.qr-caption { font-size: 10.5px; color: var(--text-muted); text-align: center; font-family: var(--font-mono); }
.qr-fallback { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.qr-fallback-title { font-family: var(--font-head); font-size: 11px; font-weight: 700; color: var(--gold-dark); }
#qrisRaw {
  display: block; width: 100%; max-height: 190px; overflow: auto;
  word-break: break-all;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px;
  font-family: var(--font-mono); font-size: 10px; line-height: 1.5; color: var(--text-soft);
}

.payment-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.payment-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.payment-row > span:first-child { flex: 0 0 96px; font-weight: 600; font-family: var(--font-head); }
.payment-row code, .payment-row strong { color: var(--text); font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.payment-row-total { border-bottom: none; align-items: baseline; }
.payment-row-total strong { font-family: var(--font-head); font-size: 21px; font-weight: 800; color: var(--gold-dark); letter-spacing: -.5px; }
.payment-row .icon-btn, .payment-row .btn-sm { margin-left: auto; }

.payment-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--gold-dark);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}
.payment-status.is-paid { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.payment-status.is-error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.payment-steps { margin: 0; padding-left: 18px; font-size: 11px; color: var(--text-muted); line-height: 1.65; }
.payment-steps li { margin-bottom: 2px; }

/* ============================ AKUN & RIWAYAT TOKEN ============================ */
.account-session {
  display: flex; flex-direction: column; gap: 7px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 12px;
}
.account-row { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-muted); }
.account-row > span:first-child { flex: 0 0 136px; font-weight: 600; font-family: var(--font-head); }
.account-row code {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px;
}
.account-row strong { font-family: var(--font-mono); color: var(--gold-dark); font-size: 12.5px; }
.account-row .icon-btn { margin-left: auto; }

.account-panel { display: none; }
.account-panel.is-active { display: block; }
.account-form { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }

.account-history { border-top: 1px dashed var(--border); padding-top: 12px; }
.account-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.account-history-head strong { font-family: var(--font-head); font-size: 12.5px; }
.token-log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.token-log-item {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  padding: 7px 9px;
  font-size: 11.5px;
}
.token-log-item .log-badge {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  text-transform: uppercase;
}
.token-log-item .log-badge.is-plus { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.token-log-item .log-badge.is-minus { background: var(--gold-soft); border-color: var(--gold-border); color: var(--gold-dark); }
.token-log-note { flex: 1 1 auto; min-width: 0; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-log-meta { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); text-align: right; }

/* Pastikan atribut [hidden] tetap menyembunyikan komponen ber-display flex/grid */
.payment-panel[hidden],
.qr-fallback[hidden],
.modal[hidden],
.modal-tabs[hidden],
.auth-user[hidden],
.auth-guest[hidden],
#btnOpenPaymentUrl[hidden] { display: none !important; }

/* Holder QR dari library qrcodejs (canvas/img) */
.qr-canvas-holder {
  display: flex; align-items: center; justify-content: center;
  width: 240px; height: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  padding: 5px;
}
.qr-canvas-holder img, .qr-canvas-holder canvas { width: 230px !important; height: 230px !important; border-radius: 8px; }

@media (max-width: 860px) {
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-panel { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .package-grid { grid-template-columns: 1fr; }
  .account-row { flex-wrap: wrap; }
  .account-row > span:first-child { flex: 1 1 100%; }
  .payment-row { flex-wrap: wrap; }
  .payment-row > span:first-child { flex: 1 1 100%; }
  .payment-row .icon-btn, .payment-row .btn-sm { margin-left: 0; }
}

/* ============================ WA BLAST & ANTREAN ============================ */
.blast-toolbar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.blast-toolbar .field { margin-bottom: 0; }
.blast-toolbar .field-inline { flex: 0 0 150px; }
.blast-toolbar .field-inline input, .blast-toolbar .field-inline select { width: 100%; }
.blast-counters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-left: auto; }

.blast-queue {
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius);
  padding: 13px 14px;
}
.blast-queue.is-done { background: var(--gold-soft); border-color: var(--gold-border); }
.blast-queue-head { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--emerald-dark); }
.blast-queue.is-done .blast-queue-head { color: var(--gold-dark); }
.blast-queue-head strong { font-family: var(--font-head); letter-spacing: -.2px; }
.blast-progress-track {
  height: 8px; margin: 10px 0;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--emerald-border);
  border-radius: 999px; overflow: hidden;
}
.blast-queue.is-done .blast-progress-track { border-color: var(--gold-border); }
.blast-progress-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald) 0%, #34D399 60%, var(--gold) 130%);
  transition: width .25s ease;
}
.blast-queue-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blast-hint { margin: 10px 0 0; font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.blast-vars { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.blast-vars-label { font-size: 11px; color: var(--text-muted); font-family: var(--font-head); font-weight: 700; }

.blast-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.blast-list-head strong { font-family: var(--font-head); font-size: 12.5px; }
.blast-list-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.blast-list-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 330px;
  background: var(--surface);
}
.blast-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.blast-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2);
  color: var(--text-soft);
  font-family: var(--font-head); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .35px;
  text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.blast-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.blast-table tbody tr:last-child td { border-bottom: none; }
.blast-table tbody tr:hover { background: #FBFDFF; }
.blast-table tbody tr.is-sent { background: var(--emerald-soft); }
.blast-table tbody tr.is-active { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.blast-table tbody tr.is-invalid { opacity: .62; }
.blast-col-check { width: 40px; text-align: center; }
.blast-col-phone { width: 150px; }
.blast-col-status { width: 120px; }
.blast-col-act { width: 118px; }

.blast-check { width: 16px; height: 16px; accent-color: var(--emerald); cursor: pointer; }
.blast-name { font-family: var(--font-head); font-weight: 700; font-size: 12.5px; color: var(--text); display: block; }
.blast-meta { font-size: 10.5px; color: var(--text-muted); font-family: var(--font-mono); display: block; margin-top: 2px; }
.blast-phone { font-family: var(--font-mono); font-size: 11.5px; color: var(--text); }
.blast-phone-na { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.blast-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
  white-space: nowrap;
}
.blast-badge.is-sent { background: var(--emerald-soft); border-color: var(--emerald-border); color: var(--emerald-dark); }
.blast-badge.is-na { background: var(--gold-soft); border-color: var(--gold-border); color: var(--gold-dark); }
.blast-badge.is-skipped { background: #FFF7ED; border-color: #FED7AA; color: #C2410C; }
.blast-send {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #16A34A 0%, var(--emerald) 100%);
  color: #fff; border: none; cursor: pointer;
  padding: 6px 10px; border-radius: 8px;
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  box-shadow: 0 6px 14px -10px rgba(5, 150, 105, .9);
}
.blast-send:hover { transform: translateY(-1px); }
.blast-send.is-disabled { background: var(--surface-2); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }

@media (max-width: 860px) {
  .blast-toolbar .field-inline { flex: 1 1 140px; }
  .blast-counters { margin-left: 0; }
}

