/* FinBoard — Kartu, statistik, daftar, dompet, anggaran, tujuan, dan kategori */
/* ===== Cards & stats ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { font-size: 15.5px; font-weight: 700; }

.tab { display: none; }
.tab.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: flex-start;
}
.stat-ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
}
.stat-income .stat-ic { background: var(--green-soft); color: var(--green); }
.stat-expense .stat-ic { background: var(--red-soft); color: var(--red); }
.stat-balance .stat-ic { background: var(--primary-soft); color: var(--primary); }
.stat-wallet .stat-ic { background: var(--amber-soft); color: var(--amber); }
.stat-card { position: relative; }
.stat-eye { position: absolute; top: 12px; right: 12px; }
.stat-eye button {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--input-bg); color: var(--muted); font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.stat-eye button:hover { background: var(--hover); color: var(--text); }
.amt-masked { letter-spacing: 2px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card h3 { font-size: 21px; font-weight: 800; letter-spacing: -.4px; margin: 2px 0; }
.stat-sub { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat-sub.up { color: var(--green); }
.stat-sub.down { color: var(--red); }

.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.grid-2-1 > .card { margin-bottom: 18px; }
.chart-wrap { position: relative; height: 280px; }
.chart-wrap.tall { height: 320px; }
.chart-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
}

/* ===== Transaction list & table ===== */
.tx-list, .mini-list { display: flex; flex-direction: column; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tx-row:last-child { border-bottom: none; }
.tx-emoji {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.tx-info { flex: 1; min-width: 0; }
.tx-info strong { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-info span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tx-amt { font-weight: 800; font-size: 14px; white-space: nowrap; }
.tx-amt.income { color: var(--green); }
.tx-amt.expense { color: var(--text); }
.tx-amt.transfer { color: var(--muted); }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mini-row:last-child { border-bottom: none; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; font-size: 13.5px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 10px 12px; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: none; }
.th-right, .td-right { text-align: right; }
.badge {
  display: inline-flex; padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge.income { background: var(--green-soft); color: var(--green); }
.badge.expense { background: var(--red-soft); color: var(--red); }
.badge.transfer { background: var(--primary-soft); color: var(--primary); }
.cat-dot { display: inline-flex; align-items: center; gap: 7px; }
.cat-dot i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.icon-sm {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: transparent; color: var(--muted); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-sm:hover { background: var(--hover); color: var(--text); }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .input { flex: 1; min-width: 140px; }
.tx-summary { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.tx-summary b { color: var(--text); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.pagination button {
  min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 700; font-size: 13px;
}
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }

/* ===== Wallets ===== */
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wallet-card {
  border-radius: 16px; padding: 18px; color: #fff; position: relative;
  min-height: 120px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.wallet-card .w-name { font-size: 13px; font-weight: 700; opacity: .9; }
.wallet-card .w-balance { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.wallet-card .w-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.wallet-card .w-actions button {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.2); color: #fff; font-size: 13px;
  backdrop-filter: blur(4px);
}
.wallet-card .w-actions button:hover { background: rgba(255,255,255,.35); }

/* ===== Budgets & bills ===== */
.budget-list { display: flex; flex-direction: column; gap: 14px; }
.budget-row {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; background: var(--input-bg);
}
.budget-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.budget-top strong { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.budget-top .cat-dot i { width: 11px; height: 11px; }
.budget-nums { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.k-cal { background: var(--input-bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 4px 0 0; }
.progress { height: 10px; border-radius: 20px; background: var(--hover); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; transition: width .4s ease; }

/* ===== Goals ===== */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.goal-card {
  border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px; background: var(--input-bg);
}
.goal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.goal-head strong { font-size: 15px; }
.goal-head .row-actions { flex: none; }
.goal-amt { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.goal-meta { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ===== Categories grid ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cat-chip {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  font-size: 13.5px; font-weight: 600; background: var(--input-bg);
}
.cat-chip i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cat-chip .row-actions { margin-left: auto; }
