/* ==========================================================================
   GMap Scraper - dark data-mining dashboard
   ========================================================================== */

:root {
  --bg: #06090f;
  --bg-2: #080d16;
  --panel: #0b1220;
  --panel-2: #0e1728;
  --panel-3: #121d33;
  --line: #1b2740;
  --line-soft: #16203444;
  --text: #e6edf7;
  --muted: #7d8da7;
  --muted-2: #5b6b85;
  --accent: #22e39a;
  --accent-dim: #12b981;
  --accent-2: #38bdf8;
  --accent-3: #a78bfa;
  --warn: #fbbf24;
  --danger: #f87171;
  --ok: #34d399;
  --radius: 12px;
  --radius-sm: 8px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  --glow: 0 0 0 1px rgba(34, 227, 154, 0.25), 0 12px 30px -14px rgba(34, 227, 154, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(34, 227, 154, 0.09), transparent 60%),
    radial-gradient(800px 480px at 92% 4%, rgba(56, 189, 248, 0.08), transparent 62%),
    radial-gradient(700px 500px at 60% 100%, rgba(167, 139, 250, 0.06), transparent 65%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ------------------------------- layout ---------------------------------- */

#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 228px;
  flex: 0 0 228px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.95), rgba(6, 9, 15, 0.98));
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #0ea5e9);
  display: grid; place-items: center;
  color: #04120c; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 18px -6px rgba(34, 227, 154, 0.7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 700; font-size: 13.5px; letter-spacing: 0.2px; }
.brand-sub { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.09em; text-transform: uppercase; }

.nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav a .ico { width: 17px; text-align: center; font-size: 14px; opacity: 0.95; }
.nav a:hover { background: #0f1a2b; color: var(--text); }
.nav a.active {
  background: linear-gradient(90deg, rgba(34, 227, 154, 0.14), rgba(34, 227, 154, 0.03));
  color: var(--accent);
  border-color: rgba(34, 227, 154, 0.22);
}
.nav a .count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-2);
  background: #0d1727;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1px 7px;
}
.nav-sep { margin: 10px 10px 4px; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.sidebar-foot { padding: 10px 12px 14px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--muted-2); }
.worker-led { display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.dot.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot.busy { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.86);
  backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: 0.2px; }
.topbar .sub { color: var(--muted); font-size: 12px; }
.topbar .spacer { flex: 1; }

.content { padding: 20px 22px 60px; max-width: 1680px; width: 100%; }

.nav-toggle { display: none; }

.nav-backdrop {
  position: fixed; inset: 0; background: rgba(3, 6, 11, 0.66);
  z-index: 110; display: none;
}
.nav-backdrop.show { display: block; }

/* ------------------------------- cards ----------------------------------- */

.card {
  background: linear-gradient(180deg, rgba(14, 23, 40, 0.9), rgba(10, 16, 28, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  /* a header may hold several buttons; let them wrap instead of pushing the card
     wider than the screen (measured: 2 buttons overflowed at 390px) */
  flex-wrap: wrap;
  row-gap: 8px;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: 0.2px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }

.grid { display: grid; gap: 16px; }
/* grid/flex children default to min-width:auto, which lets a wide table push
   the whole page sideways on mobile — pin it to 0 and let .table-wrap scroll */
.grid > *, .split > * { min-width: 0; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.kpi { padding: 15px 16px; position: relative; overflow: hidden; }
.kpi::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0.7;
}
.kpi.blue::after { background: linear-gradient(90deg, var(--accent-2), transparent 70%); }
.kpi.violet::after { background: linear-gradient(90deg, var(--accent-3), transparent 70%); }
.kpi.warn::after { background: linear-gradient(90deg, var(--warn), transparent 70%); }
/* "ok" accent = the WhatsApp card (a data-completeness figure, not a warning) */
.kpi.ok::after { background: linear-gradient(90deg, #22e39a, transparent 70%); }
.kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); }
.kpi-value { font-family: var(--mono); font-size: 26px; font-weight: 600; margin-top: 6px; letter-spacing: -0.5px; }
.kpi-foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ------------------------------- tables ---------------------------------- */

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border-radius: 0 0 var(--radius) var(--radius);
}
table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
table.data th {
  position: sticky; top: 0; z-index: 2;
  background: #0c1524;
  text-align: left;
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(27, 39, 64, 0.55);
  vertical-align: middle;
  white-space: nowrap;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.data tbody tr:hover td { background: rgba(34, 227, 154, 0.035); }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); }
table.data td.wrap { white-space: normal; min-width: 240px; }
table.data tr.expandable { cursor: pointer; }
table.data.compact td { padding: 6px 10px; }

.row-detail td {
  background: #0a1120 !important;
  white-space: normal !important;
  max-width: none !important;
  padding: 14px 16px !important;
}
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.detail-item { font-size: 12px; }
.detail-item .k { color: var(--muted-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.detail-item .v { margin-top: 2px; word-break: break-word; }

/* ------------------------------- forms ----------------------------------- */

label.field { display: block; margin-bottom: 12px; }
label.field > span.lab {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted-2); margin-bottom: 5px; font-weight: 600;
}
input[type="text"], input[type="number"], input[type="password"], input[type="url"], select, textarea {
  width: 100%;
  background: #080e1a;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(34, 227, 154, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 227, 154, 0.12);
}
textarea { min-height: 90px; font-family: var(--mono); font-size: 12px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.hint { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; min-width: 0; }
.row.tight { gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #101b2c;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: #2a3c5e; background: #14213a; }
.btn.primary {
  background: linear-gradient(145deg, var(--accent), #10b981);
  color: #04140d;
  border-color: transparent;
  box-shadow: 0 10px 24px -14px rgba(34, 227, 154, 0.9);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.07); }
.btn.danger:hover { background: rgba(248, 113, 113, 0.14); }
.btn.small { padding: 4px 9px; font-size: 11.5px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------- pills ----------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill.ok { color: var(--accent); background: rgba(34, 227, 154, 0.1); border-color: rgba(34, 227, 154, 0.28); }
.pill.blue { color: var(--accent-2); background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.28); }
.pill.violet { color: var(--accent-3); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.3); }
.pill.warn { color: var(--warn); background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); }
.pill.danger { color: var(--danger); background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.3); }
.pill.muted { color: var(--muted); background: #0d1727; border-color: var(--line); }

/* ------------------------------ progress --------------------------------- */

.bar { height: 6px; border-radius: 20px; background: #101b2c; overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar.warn > i { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.bar-label { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ------------------------------ region picker ---------------------------- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #0a1120; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600;
}
.tab.active { color: var(--accent); border-color: rgba(34, 227, 154, 0.4); background: rgba(34, 227, 154, 0.08); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 130px; overflow-y: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 20px;
  background: #0f1b2d; border: 1px solid var(--line);
  font-size: 11.5px; color: var(--text); max-width: 100%;
}
.chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.chip span.x { cursor: pointer; color: var(--muted-2); font-weight: 700; padding: 0 2px; }
.chip span.x:hover { color: var(--danger); }

.pick-list {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #080e1a; margin-top: 8px;
}
.pick-item {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px;
  border-bottom: 1px solid rgba(27, 39, 64, 0.5); font-size: 12.5px; cursor: pointer;
}
.pick-item:last-child { border-bottom: none; }
.pick-item:hover { background: rgba(34, 227, 154, 0.05); }
.pick-item input { accent-color: var(--accent); width: 14px; height: 14px; }
.pick-item .meta { margin-left: auto; color: var(--muted-2); font-size: 11px; font-family: var(--mono); }

/* -------------------------------- modal ---------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3, 6, 11, 0.78);
  backdrop-filter: blur(4px); z-index: 100;
  display: grid; place-items: center; padding: 24px;
}
.modal {
  background: linear-gradient(180deg, #0d1626, #0a101d);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 40px 80px -30px #000;
  width: min(760px, 96vw);
  max-height: 88vh;
  display: flex; flex-direction: column;
}
.modal.wide { width: min(1160px, 97vw); }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 14px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; }

/* -------------------------------- toast ---------------------------------- */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 10px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 550;
  background: #0f1c2e; border: 1px solid var(--line); box-shadow: var(--shadow);
  min-width: 220px; max-width: 420px; animation: slideIn 0.18s ease-out;
}
.toast.ok { border-color: rgba(34, 227, 154, 0.45); color: var(--accent); }
.toast.err { border-color: rgba(248, 113, 113, 0.45); color: var(--danger); }
.toast.info { border-color: rgba(56, 189, 248, 0.4); color: var(--accent-2); }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------ misc bits -------------------------------- */

.empty { padding: 34px 20px; text-align: center; color: var(--muted-2); font-size: 12.5px; }
.empty .big { font-size: 26px; margin-bottom: 8px; opacity: 0.5; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.pager .spacer { flex: 1; }
pre.code {
  background: #060b14; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; overflow: auto; max-height: 320px; font-size: 11px; line-height: 1.55; color: #b9c9e0;
}
.spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.spark .b { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(34, 227, 154, 0.18)); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark .b:hover { filter: brightness(1.3); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.stat-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(27, 39, 64, 0.7); font-size: 12.5px; }
.stat-line:last-child { border-bottom: none; }
.stat-line .v { font-family: var(--mono); color: var(--text); }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 320px; vertical-align: bottom; }
.linkish { color: var(--accent-2); cursor: pointer; }
.linkish:hover { color: var(--accent); }
.copy-field { display: flex; gap: 6px; }
.copy-field input { font-family: var(--mono); font-size: 11.5px; }
.notice {
  border: 1px solid rgba(56, 189, 248, 0.28); background: rgba(56, 189, 248, 0.07);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; color: #cfe6f5;
}
.notice.warn { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.07); color: #f5e6c8; }
.notice.ok { border-color: rgba(34, 227, 154, 0.3); background: rgba(34, 227, 154, 0.07); color: #cdf5e5; }
.switch { position: relative; width: 38px; height: 20px; background: #16233a; border-radius: 20px; border: 1px solid var(--line); cursor: pointer; transition: 0.15s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: 0.15s; }
.switch.on { background: rgba(34, 227, 154, 0.22); border-color: rgba(34, 227, 154, 0.5); }
.switch.on::after { left: 20px; background: var(--accent); }

.steps { counter-reset: s; display: grid; gap: 10px; }
.step { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.step::before {
  counter-increment: s; content: counter(s);
  flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #0f1b2d; border: 1px solid var(--line); color: var(--accent); font-size: 11px; font-family: var(--mono);
}

/* ------------------------------ responsive ------------------------------- */

@media (max-width: 1180px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  #app { flex-direction: column; }
  .nav-toggle { display: inline-flex; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: relative;
    flex-direction: row; align-items: center; justify-content: space-between;
    border-right: none; border-bottom: 1px solid var(--line);
    /* IMPORTANT: backdrop-filter creates a stacking context AND a containing
       block for fixed children, which would trap the drawer under its backdrop
       and size it against the header instead of the viewport. */
    backdrop-filter: none;
    z-index: auto;
  }
  .brand { border-bottom: none; padding: 10px 14px; }
  /* the 10 destinations become a proper drawer instead of a clipped scroll row */
  .nav {
    display: none; position: fixed; top: 0; left: 0; bottom: 0;
    width: min(290px, 86vw); z-index: 120; padding: 14px 10px;
    background: linear-gradient(180deg, #0b1220, #070c15);
    border-right: 1px solid var(--line);
    box-shadow: 24px 0 60px -30px #000;
    overflow-y: auto; flex-direction: column;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; font-size: 13.5px; }
  .sidebar-foot { display: none; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .topbar { padding: 10px 14px; }
}
@media (max-width: 560px) {
  .grid.cols-4 { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
}

/* ------------------------------ FAQ & panduan ---------------------------- */

.faq-section .card-head { align-items: center; }
.faq-icon {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(34, 227, 154, 0.12); color: var(--accent);
  font-size: 12px; font-weight: 800; font-family: var(--mono); flex: 0 0 auto;
}
.faq-item { border-top: 1px solid rgba(27, 39, 64, 0.6); }
.faq-item:first-child { border-top: none; }
.faq-q {
  width: 100%; display: flex; gap: 10px; align-items: flex-start;
  background: none; border: none; color: var(--text); text-align: left;
  padding: 11px 2px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: var(--sans); line-height: 1.45;
}
.faq-q:hover { color: var(--accent); }
.faq-caret { color: var(--accent-2); font-family: var(--mono); font-size: 11px; margin-top: 2px; transition: transform 0.15s; flex: 0 0 auto; }
.faq-item.open .faq-caret { transform: rotate(90deg); }
.faq-a {
  padding: 2px 2px 14px 22px; font-size: 12.8px; color: var(--muted);
  line-height: 1.65; max-width: 96ch;
}
.faq-a b, .faq-a strong { color: var(--text); font-weight: 650; }
.faq-a .mono { color: var(--accent-2); }
.faq-ol, .faq-ul { margin: 6px 0; padding-left: 20px; }
.faq-ol li, .faq-ul li { margin-bottom: 5px; }
.faq-pre {
  background: #060b14; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; margin: 8px 0; font-family: var(--mono); font-size: 11.5px;
  color: #b9c9e0; overflow-x: auto; white-space: pre;
}
.faq-live {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.faq-live-item .mono { color: var(--accent); }

/* ------------------------------ schedule matrix --------------------------- */

.matrix-table th { text-align: center; }
.matrix-table .is-today { background: rgba(34, 227, 154, 0.1); color: var(--accent); }
.matrix-hour {
  position: sticky; left: 0; z-index: 2;
  background: #0c1524; font-family: var(--mono); font-size: 11px;
  color: var(--muted); text-align: center; border-right: 1px solid var(--line);
}
.matrix-hour.is-now { color: var(--accent); background: rgba(34, 227, 154, 0.1); }
.is-now-row td { background: rgba(34, 227, 154, 0.03); }
.matrix-cell {
  padding: 3px 4px !important; cursor: pointer; min-width: 78px;
  border-right: 1px solid rgba(27, 39, 64, 0.5); height: 30px;
}
.matrix-cell:hover { background: rgba(56, 189, 248, 0.09); }
.matrix-cell.is-now-cell { background: rgba(34, 227, 154, 0.09); }
.matrix-add { color: transparent; font-weight: 700; font-size: 13px; display: block; text-align: center; }
.matrix-cell:hover .matrix-add { color: var(--accent); }
.matrix-pill {
  border: 1px solid; border-radius: 6px; padding: 1px 6px;
  font-size: 10.5px; font-weight: 650; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; background: rgba(255, 255, 255, 0.03);
}

/* --------------------------------- CRM kanban ----------------------------- */

.crm-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.crm-col {
  background: linear-gradient(180deg, rgba(14, 23, 40, 0.75), rgba(10, 16, 28, 0.85));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 180px;
  display: flex;
  flex-direction: column;
  max-height: 620px;
}
.crm-col.drop-target { border-color: var(--accent); box-shadow: var(--glow); }
.crm-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; border-bottom: 1px solid var(--line-soft);
  border-top: 2px solid var(--accent);
  font-size: 12px; font-weight: 700; border-radius: 10px 10px 0 0;
}
.crm-count {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  background: #0d1727; border: 1px solid var(--line); border-radius: 20px; padding: 1px 7px;
}
.crm-col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.crm-card {
  background: #0d1626; border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 9px; cursor: grab;
  transition: border-color 0.15s, transform 0.1s;
}
.crm-card:hover { border-color: #2a3c5e; }
.crm-card.dragging { opacity: 0.45; }
.crm-name { font-size: 12px; font-weight: 650; line-height: 1.3; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.crm-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; flex-wrap: wrap; }
.crm-dot { font-size: 10px; opacity: 0.8; }
.crm-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 5px; }
.crm-actions { display: flex; gap: 2px; }
.crm-empty { padding: 10px 4px; text-align: center; color: var(--muted-2); }
@media (max-width: 1180px) { .crm-board { grid-template-columns: repeat(5, minmax(160px, 1fr)); } }

/* --------------------------- map legend & markers ------------------------- */

.map-legend { display: flex; flex-wrap: wrap; gap: 7px; }
.map-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 6px; border-radius: 20px;
  background: #0f1b2d; border: 1px solid var(--line);
  color: var(--text); font-size: 11.5px; font-family: var(--sans);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.map-legend-item:hover { border-color: #2a3c5e; background: #14213a; }
.map-legend-item.active { border-color: var(--accent); background: rgba(34, 227, 154, 0.12); }
.map-swatch { display: inline-flex; align-items: center; justify-content: center; }
.map-legend-count { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
/* Leaflet divIcon wrapper: kill the default white box so only the SVG shows */
.ct-marker { background: transparent; border: none; }

/* FAQ: small table inside an answer */
.faq-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 11.8px; }
.faq-table th, .faq-table td {
  border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top;
}
.faq-table th { background: #0c1524; color: var(--muted-2); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.06em; }

/* ------------------------- multi-select slicer --------------------------- */

.ms-wrap { position: relative; }
.ms-field { margin-bottom: 0; }
.ms-btn {
  width: 100%; text-align: left; cursor: pointer;
  background: #080e1a; border: 1px solid var(--line); color: var(--text);
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-family: var(--sans);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ms-btn:hover { border-color: #2a3c5e; }
.ms-btn.filtered { border-color: rgba(34, 227, 154, 0.45); color: var(--accent); background: rgba(34, 227, 154, 0.06); }
.ms-btn.open { border-color: rgba(34, 227, 154, 0.55); }
.ms-caret { font-size: 9px; opacity: 0.7; flex: 0 0 auto; }
.ms-panel {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px);
  background: #0b1420; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 20px 44px -18px #000; padding: 8px; min-width: 230px;
}
.ms-search { margin-bottom: 6px; font-size: 12px; padding: 6px 8px; }
.ms-actions { display: flex; gap: 6px; margin-bottom: 6px; }
.ms-actions .btn { flex: 1; justify-content: center; }
.ms-list { max-height: 220px; overflow-y: auto; }
.ms-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: 6px; font-size: 12px; cursor: pointer;
}
.ms-item:hover { background: rgba(34, 227, 154, 0.07); }
.ms-item input { accent-color: var(--accent); width: 14px; height: 14px; flex: 0 0 auto; }
.ms-item span.truncate { flex: 1; min-width: 0; }
.ms-count { font-family: var(--mono); font-size: 10px; color: var(--muted-2); flex: 0 0 auto; }
.ms-empty, .ms-more { padding: 6px; }

/* map filter bar */
.map-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.map-filters .ms-panel { min-width: 240px; }

/* --------------------------- map cluster markers ------------------------- */

.ct-cluster-wrap { background: transparent; border: none; }
/* Cluster bubble: the BORDER + number are tinted with the dominant category colour
   (inline, per cluster) on a dark neutral body, so switching categories in the
   legend visibly changes the map instead of leaving a dozen identical green dots. */
.ct-cluster {
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(13, 23, 38, 0.94), rgba(5, 10, 18, 0.97));
  border: 2px solid rgba(34, 227, 154, 0.9);
  color: #eaf6ef; font-weight: 800; font-size: 12px; font-family: var(--mono);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.9);
}
@media (max-width: 900px) { .map-filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.ms-assure { padding: 0 6px 6px; line-height: 1.35; }

/* ---------------------- accounts: login, users, permissions --------------- */
.google { background: #fff; color: #1f1f1f; border: 1px solid #d7dbe3; justify-content: center; }
.google:hover { background: #f1f3f7; }
.approve-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(34, 227, 154, 0.03); margin-bottom: 8px;
}
.approve-row:last-child { margin-bottom: 0; }
.who { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.who-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-chip {
  display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 10px;
  border: 1px solid var(--line); color: var(--muted); margin: 2px 3px 0 0;
}
.sub-chip.edit { border-color: rgba(251, 191, 36, 0.35); color: #f2c56b; }
.perm-table td { vertical-align: top; }
.perm-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-tabs { display: flex; gap: 6px; }
.who .pill { font-size: 9.5px; }
@media (max-width: 640px) {
  .approve-row { flex-direction: column; align-items: flex-start; }
}

/* recent category quick-pick (Scrape Baru) */
.recent-block { border-top: 1px dashed var(--line-soft); padding-top: 10px; }
.recent-chip { background: #0a1220; border: 1px solid var(--line); }
.recent-chip:hover { border-color: rgba(34, 227, 154, .45); color: var(--accent); }
.recent-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(34, 227, 154, .08); }

/* ---------------------- schedules: bulk delete UI ------------------------ */
tr.row-picked > td { background: rgba(248, 113, 113, 0.08) !important; }
tr.is-other { opacity: 0.55; }
#dsTable th input[type="checkbox"], #dsTable td input[type="checkbox"],
#schedTable th input[type="checkbox"], #schedTable td input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--danger); cursor: pointer;
}
#dsTable td, #dsTable th { vertical-align: middle; }

/* --------------------- region picker: 3-pane cascade --------------------- */
.cascade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cascade-pane { border: 1px solid var(--line); border-radius: 10px; background: #080e1a; padding: 8px; min-width: 0; }
.cascade-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.cascade-head b { color: var(--accent); font-family: var(--mono); }
.cascade-list { max-height: 190px; }
.cascade-target { max-height: 260px; }
.tiny-input { width: 100%; margin-bottom: 6px; font-size: 12px; padding: 5px 8px; }
.chip.more { border-color: rgba(34, 227, 154, .35); color: var(--accent); }
@media (max-width: 760px) {
  .cascade-grid { grid-template-columns: 1fr; }
  .cascade-list { max-height: 150px; }
}

/* ---------------------- region pulau (island) selector ------------------- */
.island-strip { border: 1px solid var(--line); border-radius: 10px; background: #070d17; padding: 8px 10px; margin-bottom: 10px; }
.island-strip-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.island-strip-head b { color: var(--text); }
.island-chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 12px; cursor: pointer; }
.island-chip.on { border-color: rgba(34, 227, 154, .5); background: rgba(34, 227, 154, .08); color: var(--accent); }
.island-chip input { accent-color: var(--accent); }
@media (max-width: 560px) { .island-chip { font-size: 11.5px; } }
