/*
 * Market Acquisition System
 *
 * PALET: ubah warna di blok :root (terang) dan .dark (gelap) di bawah ini saja.
 * Seluruh tampilan memakai variabel tersebut.
 * Struktur layout ditulis di sini (bukan di kelas Tailwind) agar tetap rapi
 * meskipun CDN Tailwind gagal dimuat.
 */

:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --line: #dce3ec;
  --ink: #0f1f33;
  --mute: #5a6b80;

  --brand: #1f5fae;
  --brand-soft: #e4edf8;
  --on-brand: #ffffff;

  --side-bg: #0b2545;
  --side-ink: #b9c8dc;
  --side-strong: #ffffff;
  --side-hover: rgba(255, 255, 255, .07);
  --side-active: rgba(255, 255, 255, .13);
  --side-line: rgba(255, 255, 255, .12);

  --danger: #b42318;
  --danger-soft: #fdecea;
  --on-danger: #ffffff;
  --ok: #2e7d3a;

  --shadow: 0 1px 2px rgba(11, 37, 69, .06);

  --b-new-bg: #eceff3;            --b-new-fg: #475467;
  --b-contacted-bg: #e3edf7;      --b-contacted-fg: #2a5d8f;
  --b-follow-up-bg: #faefd9;      --b-follow-up-fg: #8a5a0b;
  --b-interested-bg: #dff1ee;     --b-interested-fg: #1d6b62;
  --b-converted-bg: #e1f1e3;      --b-converted-fg: #26692f;
  --b-not-interested-bg: #f6e5e5; --b-not-interested-fg: #9a3a3a;

  color-scheme: light;
}

.dark {
  --bg: #0a1119;
  --surface: #101b29;
  --surface-2: #162333;
  --line: #223247;
  --ink: #e7edf5;
  --mute: #8fa2b8;

  --brand: #5b9de0;
  --brand-soft: #15283d;
  --on-brand: #08131f;

  --side-bg: #08101a;
  --side-ink: #9db0c6;
  --side-line: rgba(255, 255, 255, .08);

  --danger: #f08077;
  --danger-soft: #3a2123;
  --on-danger: #2a0e0c;
  --ok: #7fcf8e;

  --shadow: 0 1px 2px rgba(0, 0, 0, .35);

  --b-new-bg: #232a33;            --b-new-fg: #b7c1cd;
  --b-contacted-bg: #1b2a3a;      --b-contacted-fg: #8dbbe6;
  --b-follow-up-bg: #3a2e17;      --b-follow-up-fg: #e3b95e;
  --b-interested-bg: #17312e;     --b-interested-fg: #7fd0c4;
  --b-converted-bg: #1a3320;      --b-converted-fg: #86d196;
  --b-not-interested-bg: #3a2022; --b-not-interested-fg: #e79a9a;

  color-scheme: dark;
}

/* ---------- Dasar ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* utilitas kecil (juga disediakan Tailwind) */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.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; }
.nowrap { white-space: nowrap; }
.muted { color: var(--mute); }
.fw-600 { font-weight: 600; }
.ta-right { text-align: right; }

.only-desktop { display: none !important; }
.only-narrow { display: block; }
.only-wide { display: none !important; }
@media (min-width: 768px) { .only-desktop { display: inline-flex !important; } }
/* Tabel hanya muncul bila cukup lebar; di bawah itu memakai kartu. */
@media (min-width: 1180px) {
  .only-narrow { display: none !important; }
  .only-wide { display: block !important; }
}

/* ---------- Shell ---------- */

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 16px 96px; }
.shell-main { min-height: 100vh; }

.sidebar { display: none; }
@media (min-width: 768px) {
  .container { padding: 32px 32px 48px; }
  .shell-main { margin-left: 264px; }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    z-index: 30;
    background: var(--side-bg);
    color: var(--side-ink);
  }
  .topbar, .bottom-nav { display: none !important; }
}

/* ---------- Sidebar ---------- */

.side-brand { display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 20px; }
.side-brand-name { font-weight: 700; font-size: 15px; line-height: 1.25; letter-spacing: -.005em; }
.side-brand .side-brand-name { color: var(--side-strong); }

.unit-switch {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 14px 8px; padding: 10px 12px;
  border: 1px solid var(--side-line); border-radius: 12px;
  transition: background-color .15s;
}
.unit-switch:hover { background: var(--side-hover); }
.unit-switch-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--side-active); color: var(--side-strong); font-size: 14px;
}
.unit-switch-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.unit-switch-txt small { font-size: 11px; color: var(--side-ink); }
.unit-switch-txt b { font-size: 14px; font-weight: 600; color: var(--side-strong); }
.unit-switch-go { font-size: 12px; color: var(--side-ink); }

.side-nav { flex: 1; padding: 8px 14px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--side-ink); font-weight: 500;
  transition: background-color .15s, color .15s;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--side-hover); color: var(--side-strong); }
.nav-item.is-active { background: var(--side-active); color: var(--side-strong); }

.side-foot { padding: 14px; border-top: 1px solid var(--side-line); display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 2px 4px 4px; }
.side-user-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-user-txt b { color: var(--side-strong); font-weight: 600; font-size: 13.5px; }
.side-user-txt small { color: var(--side-ink); font-size: 11.5px; }
.side-tools { display: flex; gap: 8px; }
.side-tools .btn { flex: 1; }
.logout-wide { display: block; }

.sidebar .btn-ghost { background: transparent; border-color: var(--side-line); color: var(--side-ink); }
.sidebar .btn-ghost:hover { background: var(--side-hover); color: var(--side-strong); }

/* ---------- Topbar (mobile) & plainbar ---------- */

.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { height: 56px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-unit { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: 15px; }
.topbar-unit .unit-switch-ico { background: var(--brand-soft); color: var(--brand); width: 32px; height: 32px; }
.topbar-unit-go { color: var(--mute); font-size: 11px; }
.topbar-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar-tools form { display: block; }

.plainbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.plainbar-in {
  max-width: 1120px; margin: 0 auto; height: 64px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.plainbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.plainbar-name { font-weight: 700; font-size: 15px; }
.plainbar-user { display: none; align-items: center; gap: 10px; margin-right: 8px; }
.plainbar-user-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.plainbar-user-txt b { font-size: 13px; font-weight: 600; }
.plainbar-user-txt small { font-size: 11.5px; color: var(--mute); }
@media (min-width: 768px) { .plainbar-in { padding: 0 32px; } .plainbar-user { display: flex; } }

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.bnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 60px; color: var(--mute); font-size: 11px; font-weight: 500;
}
.bnav-item i { font-size: 17px; }
.bnav-item.is-active { color: var(--brand); }

/* ---------- Brand ---------- */

.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand); color: var(--on-brand); font-size: 17px;
}
.brand-mark-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.sidebar .brand-mark, .auth-brand .brand-mark { background: #ffffff; color: #0b2545; }

/* ---------- Tipografi & kepala halaman ---------- */

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-title { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.page-title-lg { font-size: 26px; }
.page-sub { margin-top: 2px; color: var(--mute); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.page-sub i { font-size: 12px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.head-back { display: flex; align-items: center; gap: 12px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--mute); text-transform: none; margin: 24px 0 10px; }
.link { color: var(--brand); font-weight: 600; font-size: 13.5px; }
.link:hover { text-decoration: underline; }
.link-plain:hover { text-decoration: underline; }

@media (min-width: 768px) { .page-title { font-size: 24px; } .page-title-lg { font-size: 30px; } }

/* ---------- Card, chip, avatar ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }

.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 9999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--mute); font-size: 12px; font-weight: 600; line-height: 1;
}
.chip-brand { background: var(--brand-soft); border-color: transparent; color: var(--brand); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 9999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.avatar-side { background: var(--side-active); color: var(--side-strong); }

/* ---------- Tombol ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, filter .15s;
}
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 46px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon-sm { width: 34px; padding: 0; }

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(.92); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover { filter: brightness(.92); }
.btn-text-danger { color: var(--danger); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; color: var(--mute); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn-line { border: 1px solid var(--line); background: var(--surface); width: 38px; height: 38px; }

/* ---------- Form ---------- */

.label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.input {
  display: block; width: 100%; height: 42px; padding: 0 13px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--mute); opacity: .7; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input-error { border-color: var(--danger); }
.input-error:focus { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.has-icon, .select-wrap { position: relative; }
.has-icon .input { padding-left: 38px; }
.has-icon .input.has-eye { padding-right: 42px; }
.ico-left { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 13px; pointer-events: none; }
.ico-right { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 11px; pointer-events: none; }
.eye-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 8px; color: var(--mute);
}
.eye-btn:hover { background: var(--surface-2); color: var(--ink); }
.select { -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer; }

.field-error { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--danger); font-size: 12.5px; }

@media (max-width: 767px) { .input { font-size: 16px; } }

.form-wrap { max-width: 560px; }
.form-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 8px; padding-top: 6px; }
@media (min-width: 768px) { .form-card { padding: 24px; } }

/* ---------- Login ---------- */

.auth { min-height: 100vh; }
.auth-brand { display: none; }
.auth-pane { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 72px 16px 32px; }
.auth-tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.auth-form .btn-block { margin-top: 6px; }

@media (min-width: 900px) {
  .auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .auth-brand {
    display: flex; flex-direction: column; justify-content: space-between;
    background: var(--side-bg); color: var(--side-strong); padding: 40px 48px;
  }
  .auth-brand-top { display: flex; align-items: center; gap: 12px; }
  .auth-headline { font-size: 34px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; max-width: 14ch; padding-bottom: 24px; }
  .auth-mobile-brand { display: none; }
  .auth-pane { padding: 32px; }
  .auth-tools { top: 24px; right: 24px; }
}

/* ---------- Dashboard ---------- */

.kpi-top { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .kpi-top { grid-template-columns: 1fr 1fr; } }
.kpi { display: flex; align-items: center; gap: 16px; padding: 20px; }
a.kpi { transition: background-color .15s; }
a.kpi:hover { background: var(--surface-2); }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: 13px; color: var(--mute); font-weight: 500; }
.kpi-value { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }

.stat-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); font-size: 19px;
}
.stat-icon-danger { width: 42px; height: 42px; background: var(--danger-soft); color: var(--danger); font-size: 16px; }

.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
.status-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; transition: background-color .15s; }
.status-card:hover { background: var(--surface-2); }
.status-num { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.status-pct { font-size: 12px; color: var(--mute); margin-top: -4px; }
.bar { display: block; width: 100%; height: 5px; border-radius: 9999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 9999px; background: var(--brand); }
.bar-new .bar-fill            { background: var(--b-new-fg); }
.bar-contacted .bar-fill      { background: var(--b-contacted-fg); }
.bar-follow-up .bar-fill      { background: var(--b-follow-up-fg); }
.bar-interested .bar-fill     { background: var(--b-interested-fg); }
.bar-converted .bar-fill      { background: var(--b-converted-fg); }
.bar-not-interested .bar-fill { background: var(--b-not-interested-fg); }

.panel { margin-top: 24px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 700; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; transition: background-color .15s; }
.list-row:hover { background: var(--surface-2); }
.list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.list-main b { font-weight: 600; font-size: 14px; }
.list-main small { color: var(--mute); font-size: 12.5px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 16px; color: var(--mute); text-align: center; }
.empty i { font-size: 26px; }
.empty p { font-size: 13.5px; }
.empty-lg { padding: 48px 16px; gap: 12px; }

/* ---------- Pilih unit ---------- */

.unit-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .unit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .unit-grid { grid-template-columns: repeat(4, 1fr); } }
.unit-grid form { display: block; min-width: 0; }

.unit-card {
  display: flex; flex-direction: column; gap: 14px; width: 100%; text-align: left;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  transition: border-color .15s, background-color .15s;
}
.unit-card:hover { border-color: var(--brand); background: var(--surface-2); }
.unit-card.is-current { border-color: var(--brand); }
.unit-top { display: flex; align-items: center; justify-content: space-between; }
.unit-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); font-size: 20px;
}
.unit-go {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9999px; color: var(--mute); font-size: 12px;
  border: 1px solid var(--line); transition: background-color .15s, color .15s, border-color .15s;
}
.unit-card:hover .unit-go { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.unit-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.unit-stats { display: flex; gap: 28px; padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--line); }
.unit-stat { display: flex; flex-direction: column; line-height: 1.25; }
.unit-stat b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.unit-stat small { font-size: 12px; color: var(--mute); }

/* ---------- Daftar: filter, tabel, kartu ---------- */

.filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.filters-search { flex: 1; min-width: 0; }
.filters-right { display: flex; gap: 8px; }
.filters-right .select-wrap { flex: 1; min-width: 0; }
@media (min-width: 640px) {
  .filters { flex-direction: row; }
  .filters-right .select-wrap { flex: none; width: 190px; }
}

.table-card { overflow: hidden; }
.tbl { width: 100%; table-layout: fixed; font-size: 14px; }
.tbl th {
  padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--mute);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.tbl td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.cell-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.prospect-card { padding: 16px; min-width: 0; }
.pc-top { display: flex; align-items: center; gap: 12px; }
.pc-id { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.pc-id b { font-weight: 600; font-size: 14.5px; }
.pc-phone { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 13px; }
.pc-phone i { font-size: 11px; }
.pc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 12.5px; color: var(--mute); }
.pc-meta > span:first-child { min-width: 0; }
.pc-meta i { margin-right: 6px; font-size: 11px; }
.pc-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pager-info { font-size: 13px; color: var(--mute); }
.pager-nav { display: flex; align-items: center; gap: 8px; }
.pager-pos { font-size: 13px; color: var(--mute); }

/* ---------- Menu export ---------- */

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 10rem; padding: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.menu-item i { width: 16px; text-align: center; color: var(--mute); }
.menu-item:hover { background: var(--surface-2); }

/* ---------- Badge ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 9999px;
  font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 9999px; background: currentColor; flex: none; }
.badge-new            { background: var(--b-new-bg);            color: var(--b-new-fg); }
.badge-contacted      { background: var(--b-contacted-bg);      color: var(--b-contacted-fg); }
.badge-follow-up      { background: var(--b-follow-up-bg);      color: var(--b-follow-up-fg); }
.badge-interested     { background: var(--b-interested-bg);     color: var(--b-interested-fg); }
.badge-converted      { background: var(--b-converted-bg);      color: var(--b-converted-fg); }
.badge-not-interested { background: var(--b-not-interested-bg); color: var(--b-not-interested-fg); }

/* ---------- Toast ---------- */

.toast-wrap { position: fixed; z-index: 60; top: 66px; left: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 18px rgba(11, 37, 69, .12); font-size: 14px; font-weight: 500; pointer-events: auto;
}
.toast-text { flex: 1; min-width: 0; }
.toast-close { width: 24px; height: 24px; border-radius: 6px; color: var(--mute); }
.toast-close:hover { background: var(--surface-2); color: var(--ink); }
@media (min-width: 768px) { .toast-wrap { top: 24px; left: auto; right: 24px; width: 340px; } }

/* ---------- Dialog hapus ---------- */

.dlg {
  width: calc(100% - 32px); max-width: 24rem; padding: 0; margin: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
}
.dlg::backdrop { background: rgba(8, 16, 26, .55); }
.dlg-body { padding: 20px; }
.dlg-head { display: flex; align-items: flex-start; gap: 14px; }
.dlg-text { min-width: 0; padding-top: 2px; }
.dlg-text h2 { font-size: 16px; font-weight: 700; }
.dlg-text p { margin-top: 4px; font-size: 13.5px; color: var(--mute); overflow-wrap: anywhere; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------- Halaman error ---------- */

.fatal { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fatal-box { width: 100%; max-width: 24rem; padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fatal-box .page-title { justify-content: center; }
.fatal-text { color: var(--mute); font-size: 14px; margin-bottom: 8px; }

/* ---------- Ikon tema: bulan di mode terang, matahari di mode gelap ---------- */

.dark .icon-moon, html:not(.dark) .icon-sun { display: none; }
