/* =========================================================
   SIMPEL KEUANGAN — Design tokens
   Palette: putih bersih + aksen biru halus
   ========================================================= */
:root {
  --bg:            #f6f8fb;
  --surface:       #ffffff;
  --surface-soft:  #f0f5fc;
  --border:        #e6ebf2;
  --text:          #1c2536;
  --text-muted:    #7c879b;
  --text-faint:    #a7b1c2;

  --blue-50:  #eef4ff;
  --blue-100: #dbe8ff;
  --blue-400: #5b9bf5;
  --blue-500: #3b7ff0;
  --blue-600: #2f6ce0;
  --blue-700: #2557bd;

  --green:  #12b76a;
  --green-bg: #e7f9f0;
  --red:    #f04438;
  --red-bg: #fdeeed;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(28, 37, 54, 0.04);
  --shadow-md: 0 10px 30px rgba(28, 37, 54, 0.07);
  --shadow-focus: 0 0 0 3px rgba(59, 127, 240, 0.18);

  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-text, .stat-value {
  font-family: var(--font-display);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Auth pages (login/register) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f6f9fe 0%, #eef4ff 100%);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
}
.auth-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  margin-bottom: 18px;
}
.auth-card h1 {
  font-size: 22px;
  margin: 0 0 4px;
}
.auth-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.auth-foot {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
.auth-foot a { color: var(--blue-600); font-weight: 600; }

/* ---------- Form elements ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  transition: box-shadow .15s, border-color .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: var(--shadow-focus);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue-500); color: #fff; box-shadow: 0 4px 14px rgba(59, 127, 240, 0.28); }
.btn-primary:hover { background: var(--blue-600); box-shadow: 0 6px 18px rgba(59, 127, 240, 0.34); }
.btn-block { width: 100%; }
.btn-secondary { background: var(--surface-soft); color: var(--blue-700); border-color: var(--blue-100); }
.btn-secondary:hover { background: var(--blue-100); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--blue-400); color: var(--blue-600); }
.btn-danger-ghost { background: #fff; color: var(--red); border-color: var(--border); }
.btn-danger-ghost:hover { background: var(--red-bg); border-color: var(--red); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-icon { padding: 8px; border-radius: var(--radius-pill); }

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert-error { background: var(--red-bg); color: #b42318; border: 1px solid #f6c6c1; }
.alert-success { background: var(--green-bg); color: #067647; border: 1px solid #a9e6c8; }

/* ---------- App shell ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .18s ease, padding .18s ease;
}
.sidebar-collapse-btn {
  display: none;
  position: absolute;
  top: 26px;
  right: -12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 5;
  padding: 0;
}
.sidebar-collapse-btn:hover { color: var(--blue-600); border-color: var(--blue-100); }
.sidebar-collapse-btn svg { transition: transform .18s ease; }
@media (min-width: 781px) { .sidebar-collapse-btn { display: flex; } }

.app-shell.sidebar-collapsed .sidebar { width: 76px; padding-left: 10px; padding-right: 10px; }
.app-shell.sidebar-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.app-shell.sidebar-collapsed .brand-text { display: none; }
.app-shell.sidebar-collapsed .nav-link { justify-content: center; padding: 10px; }
.app-shell.sidebar-collapsed .nav-link span { display: none; }
.app-shell.sidebar-collapsed .install-app-btn { display: none !important; }
.app-shell.sidebar-collapsed .user-chip { flex-direction: column; gap: 8px; }
.app-shell.sidebar-collapsed .user-info { display: none; }
.app-shell.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 24px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.brand-text { font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; flex: 1; }
.sidebar-close {
  display: none;
  background: var(--surface-soft);
  border: none;
  border-radius: var(--radius-pill);
  width: 30px; height: 30px;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-close:hover { background: var(--red-bg); color: var(--red); }
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20, 28, 46, 0.42);
  z-index: 85;
  opacity: 0;
  transition: opacity .2s ease;
}
.sidebar-backdrop.open { display: block; opacity: 1; }

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  /* Tanpa min-height:0, flex item defaultnya tidak mau menyusut di
     bawah tinggi kontennya sendiri (default flex-basis: auto) — jadi
     kalau daftar menu ini lebih tinggi dari sisa ruang sidebar (mis. di
     HP dengan layar pendek, atau admin yang punya menu "Anggota" ekstra),
     dia meluber dan mendorong .sidebar-footer (foto profil/nama/logout)
     keluar dari layar, tidak kelihatan & tidak bisa di-scroll ke situ.
     min-height:0 + overflow-y:auto memperbaikinya: daftar menu jadi bisa
     di-scroll sendiri, sementara footer tetap menempel di bawah. */
  min-height: 0;
  overflow-y: auto;
}
.brand, .sidebar-footer { flex-shrink: 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-soft); color: var(--text); }
.nav-link.active { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }
.nav-link svg { flex-shrink: 0; opacity: 0.9; }

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-100); color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13.5px; font-weight: 600; }
.user-logout { font-size: 12.5px; color: var(--text-muted); }
.user-logout:hover { color: var(--red); }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 32px;
}
.page-title { font-size: 21px; margin: 0; letter-spacing: -0.01em; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); }
.content { padding: 0 32px 40px; flex: 1; }

/* ---------- Cards / stats ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card-pad { padding: 24px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 { margin: 0; font-size: 15.5px; }
.card-head .sub { font-size: 12.5px; color: var(--text-muted); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
}
.stat-card:hover, .card:hover { box-shadow: var(--shadow-md); }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-bottom: 10px; display:flex; align-items:center; gap:8px;}
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.stat-card.income .stat-value { color: var(--green); }
.stat-card.expense .stat-value { color: var(--red); }
.stat-card.balance .stat-value { color: var(--blue-700); }
.stat-icon {
  width: 32px; height: 32px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card.income .stat-icon { background: var(--green-bg); color: var(--green); }
.stat-card.expense .stat-icon { background: var(--red-bg); color: var(--red); }
.stat-card.balance .stat-icon { background: var(--blue-50); color: var(--blue-600); }

.grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
}

.dashboard-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}
.dashboard-analysis-grid .chart-wrap { height: 200px; }
.dashboard-analysis-grid .chart-wrap-donut { height: 170px; }

.hi-amount {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green);
  margin-bottom: 10px;
}
.hi-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.hi-date { font-size: 12.5px; color: var(--text-muted); }
.hi-note { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- Month selector ---------- */
.month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
}
.month-nav button {
  background: none; border: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.month-nav button:hover { background: var(--surface-soft); color: var(--blue-600); }
.month-nav .month-label { font-weight: 600; font-size: 14px; min-width: 132px; text-align: center; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-soft); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-soft);
}
.tag-dot { width: 7px; height: 7px; border-radius: 50%; }
.amount-income { color: var(--green); font-weight: 600; }
.amount-expense { color: var(--red); font-weight: 600; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { color: var(--text-faint); margin-bottom: 12px; }
.empty-state p { margin: 4px 0 0; font-size: 13.5px; }

/* ---------- Filters bar ---------- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters-bar select, .filters-bar input[type=text] {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: #fff;
}
.spacer { flex: 1; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 28, 46, 0.42);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%; max-width: 440px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* ---------- Category chips (settings page) ---------- */
.cat-section { margin-bottom: 26px; }
.cat-section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

/* ---------- Profil (foto + nama), Setting > Akun ---------- */
.profile-edit-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.profile-avatar-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.profile-avatar-preview,
.profile-avatar-fallback {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover;
}
.profile-avatar-fallback {
  background: var(--blue-100); color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
}
.cat-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 8px 8px 14px;
  font-size: 13.5px; font-weight: 500;
}
.cat-chip .cat-dot { width: 10px; height: 10px; border-radius: 50%; }
.cat-chip button {
  background: var(--surface-soft); border: none; cursor: pointer;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.cat-chip button:hover { background: var(--red-bg); color: var(--red); }
.add-cat-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px dashed var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 600;
  color: var(--blue-600); background: var(--blue-50);
  cursor: pointer;
}
.add-cat-btn:hover { background: var(--blue-100); }

.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
}
.color-swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }

/* ---------- Export buttons ---------- */
.export-group { display: flex; gap: 8px; }

/* ---------- Chart legend ---------- */
.legend-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-row .cat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-row .legend-name { flex: 1; color: var(--text); }
.legend-row .legend-value { font-weight: 600; }
.legend-row .legend-pct { color: var(--text-faint); width: 38px; text-align: right; }

/* ---------- Wallet balance cards (dashboard) ---------- */
.wallet-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.wallet-balance-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: var(--surface);
  transition: box-shadow .15s, transform .15s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wallet-balance-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.wallet-balance-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallet-balance-icon svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.wallet-balance-body { flex: 1; min-width: 0; }
.wallet-balance-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-balance-type { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.wallet-balance-amount { font-size: 15.5px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.01em; margin-top: 6px; white-space: nowrap; }
.wallet-balance-amount.positive { color: var(--text); }
.wallet-balance-amount.negative { color: var(--red); }

/* ---------- Print header (hanya tampil saat dicetak) ---------- */
.print-header { display: none; }

/* ---------- Print styles ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .menu-toggle,
  .filters-bar .month-nav button,
  .filters-bar select,
  .filters-bar input,
  #btnAddTx, #btnExportPdf, .fab-add-tx, .wallet-total-toggle, .print-row,
  .row-actions, .recent-tx-actions, .data-table th:last-child, .data-table td:last-child,
  .add-cat-btn, .cat-chip button,
  .modal-overlay {
    display: none !important;
  }
  .app-shell { display: block; }
  .main-area { width: 100%; }
  .content { padding: 0 8px 20px; }
  .topbar { padding: 0 0 4px; }
  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid #3b7ff0;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }
  .print-brand { font-weight: 700; font-size: 16px; color: #1c2536; }
  .print-meta { font-size: 11px; color: #666; }
  .filters-bar { margin-bottom: 14px; }
  .month-nav { border: none; padding: 0; }
  .month-nav .month-label { font-size: 16px; }
  .card, .stat-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  .stat-grid, .grid-2, .wallet-balance-grid { break-inside: avoid; }
  .data-table th, .data-table td { font-size: 11px; padding: 8px 10px; }
  .icon-btn { display: none !important; }
}
@media (max-width: 980px) {
  .stat-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .dashboard-analysis-grid { grid-template-columns: 1fr; }
}

.anggota-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .anggota-layout { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .menu-toggle { display: flex; }
  .sidebar-close { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 90;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,0.15); }
  .topbar { padding: 16px 18px; }
  .content { padding: 0 18px 32px; }
  .field-row { flex-direction: column; gap: 0; }
}

/* ============ Setting page (gabungan Kategori + Dompet) ============ */
.settings-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-alt, #eef2f8);
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 10px;
}
.settings-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.settings-tab.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.settings-hint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 14px 2px;
}
.settings-panel { margin-bottom: 18px; }

/* ============ Drag handle / reorder ============ */
.drag-handle {
  color: var(--text-faint);
  cursor: grab;
  flex-shrink: 0;
}
[data-drag-id] { cursor: default; }
[data-drag-id].dragging { opacity: 0.45; }
.cat-chip[draggable="true"] { cursor: grab; }

/* ============ Total Saldo Semua Dompet (card terpisah, dashboard) ============ */
.wallet-total-row {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1d3a86 0%, #2f6ce0 60%, #4a8bf5 100%);
  color: #fff;
  padding: 22px 26px;
  border-radius: var(--radius-xl);
  margin-bottom: 18px;
  box-shadow: 0 14px 30px rgba(29, 58, 134, 0.28);
}
.wallet-total-row::before {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  top: -70px; right: -30px;
  pointer-events: none;
}
.wallet-total-text { position: relative; z-index: 1; }
.wallet-total-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}
.wallet-total-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wallet-total-value {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.wallet-total-toggle {
  width: 30px; height: 30px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.wallet-total-toggle:hover { background: rgba(255, 255, 255, 0.3); }
.wallet-total-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wallet-total-icon svg { width: 26px; height: 26px; }

/* ============ Tombol Tambah Transaksi (floating) ============ */
.fab-add-tx {
  position: fixed;
  right: 26px;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--blue-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(59, 127, 240, 0.4);
  cursor: pointer;
  z-index: 60;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.fab-add-tx:hover { background: var(--blue-600); box-shadow: 0 14px 32px rgba(59, 127, 240, 0.48); }
.fab-add-tx:active { transform: scale(0.94); }

/* ============ Baris tombol Cetak (paling bawah dashboard) ============ */
.print-row {
  display: flex;
  justify-content: center;
  margin: 8px 0 90px;
}

/* ============ Catatan (bank/e-wallet notes) ============ */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.note-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}
.note-card:hover { box-shadow: var(--shadow-sm); border-color: var(--blue-100); }
.note-card-drag {
  color: var(--text-faint);
  cursor: grab;
  padding-top: 4px;
  flex-shrink: 0;
}
.note-card-body { flex: 1; min-width: 0; }
.note-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.note-bank { font-weight: 700; font-size: 14px; }
.note-number {
  font-family: 'Plus Jakarta Sans', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  word-break: break-all;
}
.note-holder {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.note-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}
.note-card-actions .copy-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .note-card { flex-wrap: wrap; }
  .note-card-actions { flex-direction: row; }
}

/* ============ Tombol Install App (PWA) ============ */
.install-app-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 10px;
}
.install-app-btn:hover { background: var(--blue-100); }

/* ============ Tombol Kunci Aplikasi ============ */
.lock-btn {
  margin-left: auto;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lock-btn:hover { background: var(--red-bg); color: var(--red); }


/* ============ Field sandi (disamarkan tanpa type=password) ============ */
.field-password { position: relative; }
.field-password input {
  -webkit-text-security: disc;
  text-security: disc;
}
.auth-card .alert-error {
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* ============ User chip: nama akun + role badge ============ */
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============ Badge kecil (mis. "Admin" di daftar anggota) ============ */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============ Setting > Akun: link publik catatan ============ */
.share-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.share-link-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 13px;
}

/* ============ Halaman publik (public.php) ============ */
.public-card { text-align: left; }
.public-card .notes-grid { grid-template-columns: 1fr; margin-top: 6px; }
.public-card .note-card { border-radius: var(--radius-md); }
.public-card .empty-state { padding: 12px 0; }

/* =========================================================
   HERO GREETING SECTION (dashboard) — terinspirasi WLLT-e:
   gradient biru tua, sudut membulat besar, ilustrasi dompet.
   ========================================================= */
.hero-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #142452 0%, #1d3a86 52%, #2f5fd6 100%);
  border-radius: var(--radius-xl);
  padding: 30px 34px;
  margin-bottom: 20px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(20, 36, 82, 0.28);
}
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.hero-section::before { width: 260px; height: 260px; top: -110px; right: 60px; }
.hero-section::after { width: 160px; height: 160px; bottom: -80px; right: 220px; background: rgba(255, 255, 255, 0.045); }
.hero-text { position: relative; z-index: 1; min-width: 0; }
.hero-greeting {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-motivation {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 14px;
  max-width: 420px;
}
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(2px);
}
.hero-illustration {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-illustration svg { width: 100%; height: 100%; }

@media (max-width: 640px) {
  .hero-section { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .hero-illustration { width: 92px; height: 92px; align-self: flex-end; margin-top: -20px; }
  .hero-greeting { font-size: 20px; }
  .wallet-total-value { font-size: 26px; }
  .fab-add-tx { right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; }
}

/* ============ Transaksi Terbaru (dashboard) ============ */
.recent-tx-list { display: flex; flex-direction: column; gap: 2px; }
.recent-tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.recent-tx-row:last-child { border-bottom: none; }
.recent-tx-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.recent-tx-row.income .recent-tx-icon { background: var(--green-bg); color: var(--green); }
.recent-tx-row.expense .recent-tx-icon { background: var(--red-bg); color: var(--red); }
.recent-tx-row.transfer .recent-tx-icon { background: var(--blue-50); color: var(--blue-600); }
.recent-tx-info { flex: 1; min-width: 0; }
.recent-tx-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-tx-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.recent-tx-amount { font-size: 14px; font-weight: 700; font-family: var(--font-display); flex-shrink: 0; white-space: nowrap; }
.recent-tx-row.income .recent-tx-amount { color: var(--green); }
.recent-tx-row.expense .recent-tx-amount { color: var(--red); }
.recent-tx-row.transfer .recent-tx-amount { color: var(--blue-700); }
.recent-tx-end { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.recent-tx-actions { display: flex; gap: 5px; }
.recent-tx-action-btn {
  width: 23px; height: 23px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-faint);
  transition: all .15s;
}
.recent-tx-action-btn:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.recent-tx-action-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.recent-tx-viewall { display: block; text-align: center; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--blue-600); }
.recent-tx-viewall:hover { color: var(--blue-700); }

/* ============ Hutang / Piutang ============ */
.debt-summary-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.debt-summary-card {
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.debt-summary-owe { background: linear-gradient(135deg, #ef5350, #d63a34); }
.debt-summary-owe.recv { background: linear-gradient(135deg, #f59e0b, #d9820a); }
.debt-summary-paid { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.debt-summary-label { font-size: 12.5px; font-weight: 600; opacity: 0.9; }
.debt-summary-value { font-family: var(--font-display); font-size: 22px; font-weight: 800; }

.debt-list { display: flex; flex-direction: column; gap: 14px; }
.debt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--surface);
  transition: box-shadow .15s;
}
.debt-card:hover { box-shadow: var(--shadow-sm); }
.debt-card.is-lunas { opacity: 0.72; }
.debt-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.debt-card-name { font-size: 15px; font-weight: 700; }
.debt-card-note { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.debt-card-amounts { display: flex; gap: 24px; margin-bottom: 10px; }
.debt-card-amounts .amt-label { display: block; font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.debt-card-amounts .amt-value { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.debt-card-amounts .amt-value.remaining { color: var(--red); }
.recv-card .debt-card-amounts .amt-value.remaining { color: #d9820a; }

.progress-bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-soft); overflow: hidden; margin-bottom: 12px; }
.progress-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); transition: width .3s ease; }
.progress-fill.recv-fill { background: linear-gradient(90deg, #f7b955, #d9820a); }

.debt-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; flex-wrap: wrap; }
.status-badge { padding: 4px 11px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.status-badge.status-lunas { background: var(--green-bg); color: var(--green); }
.status-badge.status-belum { background: var(--red-bg); color: var(--red); }

.due-chip { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; }
.due-chip.due-overdue { background: var(--red-bg); color: var(--red); }
.due-chip.due-due-today { background: #fff1cc; color: #b45309; }
.due-chip.due-due-soon { background: #fff1cc; color: #b45309; }
.due-chip.due-due-far { background: var(--blue-50); color: var(--blue-700); }

.debt-card-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.pay-history { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 14px; max-height: 260px; overflow-y: auto; }
.pay-history-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 10px; }
.pay-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pay-history-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--border);
}
.pay-history-table th.col-hapus, .pay-history-table td.col-hapus { text-align: center; width: 56px; }
.pay-history-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pay-history-table tr:last-child td { border-bottom: none; }
.pay-history-amount { font-weight: 700; }
.pay-history-note { color: var(--text-muted); font-size: 12px; }
.pay-history-empty { text-align: center; padding: 14px 0; color: var(--text-muted); font-size: 13px; }

@media (max-width: 640px) {
  .debt-summary-row { grid-template-columns: 1fr; }
  .debt-card-amounts { gap: 16px; }
}

@media print {
  .hero-section { display: none !important; }
}

/* ============ Zona Berbahaya (Hapus Data) ============ */
.danger-zone {
  border: 1px solid rgba(239, 83, 80, 0.35);
  background: var(--red-bg);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.reset-scope-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.reset-scope-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.reset-scope-option:has(input:checked) {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.12);
}
.reset-scope-option input[type="radio"] { margin-top: 3px; accent-color: var(--red); flex-shrink: 0; }
.reset-scope-option-text { font-size: 13px; }
.reset-scope-option-title { font-weight: 700; display: block; margin-bottom: 2px; }
.reset-scope-option-desc { color: var(--text-muted); font-size: 12px; }

/* ============ Anggaran (Alokasi Gaji, Budget, Kalkulator Dana) ============ */
.budget-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-soft);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.budget-tab-btn {
  border: none;
  background: transparent;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.budget-tab-btn.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.budget-panel { display: none; }
.budget-panel.active { display: block; }

.income-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.income-row .field { margin-bottom: 0; flex: 1; min-width: 200px; max-width: 280px; }

.pct-total-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.pct-total-banner.ok { background: var(--green-bg); color: var(--green); }
.pct-total-banner.warn { background: #fff1cc; color: #b45309; }

.alloc-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.alloc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--surface);
}
.alloc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.alloc-card-name { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; }
.alloc-card-name .cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.alloc-card-pct { font-size: 12.5px; font-weight: 700; color: var(--text-muted); background: var(--surface-soft); padding: 3px 10px; border-radius: var(--radius-pill); }
.alloc-card-amounts { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.alloc-card-amounts .amt-label { display: block; font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.alloc-card-amounts .amt-value { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; }
.alloc-card-amounts .amt-value.over { color: var(--red); }
.alloc-card-amounts .amt-value.remain-ok { color: var(--green); }
.alloc-progress-bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-soft); overflow: hidden; margin-bottom: 12px; }
.alloc-progress-fill { height: 100%; border-radius: var(--radius-pill); transition: width .3s ease; }
.alloc-progress-fill.over-budget { background: var(--red) !important; }
.alloc-card-mapped { font-size: 11.5px; color: var(--text-faint); margin-bottom: 12px; }
.alloc-card-mapped .chip { display: inline-block; background: var(--surface-soft); padding: 2px 8px; border-radius: var(--radius-pill); margin: 2px 3px 0 0; }
.alloc-card-actions { display: flex; gap: 8px; justify-content: flex-end; }

.unmapped-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--surface-soft);
}
.unmapped-box .title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 10px; }
.unmapped-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 13px; }

.cat-checklist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cat-checklist-count { font-size: 11px; font-weight: 700; color: var(--blue-600); background: var(--blue-50); padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.cat-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 260px;
  overflow-y: auto;
  padding: 2px 2px 2px 0;
}
.cat-check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.cat-check-card:hover { border-color: var(--blue-200, #bfdbfe); background: var(--surface-soft); }
.cat-check-card input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.cat-check-card .check-box {
  width: 19px; height: 19px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #fff;
  transition: background .15s, border-color .15s;
}
.cat-check-card .check-box svg { opacity: 0; transition: opacity .1s; }
.cat-check-card:has(input:checked) { border-color: var(--blue-500, #3b82f6); background: var(--blue-50); }
.cat-check-card:has(input:checked) .check-box { background: var(--blue-600); border-color: var(--blue-600); }
.cat-check-card:has(input:checked) .check-box svg { opacity: 1; }
.cat-check-card .cat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.cat-check-card .cat-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-check-card .taken-note { font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; white-space: nowrap; }
.cat-checkbox-empty { font-size: 13px; color: var(--text-muted); padding: 10px 2px; }

/* Kalkulator Dana Darurat & Pensiun */
.fund-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .fund-calc-grid { grid-template-columns: 1fr; } }

.fund-result-list { display: flex; flex-direction: column; gap: 2px; }
.fund-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.fund-result-row:last-child { border-bottom: none; }
.fund-result-row.highlight { background: var(--blue-50); border-radius: var(--radius-md); padding: 12px 14px; margin-top: 6px; border-bottom: none; }
.fund-result-label { font-size: 13px; color: var(--text-muted); }
.fund-result-value { font-family: var(--font-display); font-size: 15px; font-weight: 700; text-align: right; }
.fund-result-value.big { font-size: 19px; color: var(--blue-700); }
.fund-result-value.danger { color: var(--red); }

@media (max-width: 640px) {
  .income-row .field { max-width: none; }
  .alloc-card-amounts { gap: 14px; }
}

/* ============ Chart container (fixed height, tidak melar di layar lebar) ============ */
.chart-wrap { position: relative; width: 100%; height: 260px; }
.chart-wrap-donut { height: 220px; }
@media (max-width: 640px) {
  .chart-wrap { height: 220px; }
  .chart-wrap-donut { height: 200px; }
}
