/* ===== DATA TRANSAKSI — UI Baru ===== */
.dt-row:hover { background: rgba(167,139,250,0.07) !important; }
.dt-seq-pill {
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 5px;
  padding: 3px 7px;
  color: var(--tx2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  display: inline-block;
}
.dt-seq-pill:hover { border-color: rgba(167,139,250,0.5); color: var(--pu); }
.dt-act-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  flex-shrink: 0;
}
.dt-act-edit { border-color: rgba(96,165,250,0.25); color: #60a5fa; }
.dt-act-edit:hover { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.5); }
.dt-act-del { border-color: rgba(248,113,113,0.2); color: #f87171; }
.dt-act-del:hover { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.45); }

/* ===== MODAL DETAIL TRANSAKSI ===== */
.tx-detail-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  align-items: center; justify-content: center;
}
.tx-detail-box {
  background: #131627;
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 16px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  animation: txPopIn .18s ease;
  margin: 16px;
}
@keyframes txPopIn { from { opacity:0; transform:scale(.96) } to { opacity:1; transform:scale(1) } }
.tx-detail-head {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(167,139,250,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.tx-detail-title {
  font-size: 11px; font-weight: 600; color: var(--pu);
  letter-spacing: .06em; text-transform: uppercase;
}
.tx-detail-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--tx2); transition: all .15s;
}
.tx-detail-close:hover { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.3); color: #f87171; }
.tx-detail-body { padding: 20px; }
.tx-detail-amt { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.tx-detail-desc { font-size: 14px; font-weight: 500; color: var(--tx); margin-bottom: 16px; line-height: 1.4; }
.tx-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.tx-dfield { display: flex; flex-direction: column; gap: 3px; }
.tx-dlabel { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; }
.tx-dval { font-size: 13px; color: var(--tx); font-weight: 500; line-height: 1.4; }
.tx-uuid-section { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 14px; margin-bottom: 16px; }
.tx-uuid-label { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.tx-uuid-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
}
.tx-uuid-text { font-family: var(--mono); font-size: 10px; color: var(--tx3); word-break: break-all; line-height: 1.6; flex: 1; }
.tx-copy-btn {
  flex-shrink: 0;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 5px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; color: var(--pu);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.tx-copy-btn:hover { background: rgba(167,139,250,0.2); }
.tx-copy-btn.ok { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.3); color: var(--gn); }
.tx-detail-actions { display: flex; gap: 8px; }
.tx-det-edit {
  flex: 1; padding: 9px; border-radius: 8px;
  border: 1px solid rgba(96,165,250,0.3);
  background: rgba(96,165,250,0.08);
  color: #60a5fa; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tx-det-edit:hover { background: rgba(96,165,250,0.15); }
.tx-det-del {
  flex: 1; padding: 9px; border-radius: 8px;
  border: 1px solid rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.08);
  color: #f87171; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tx-det-del:hover { background: rgba(248,113,113,0.15); }
/* Scrollbar untuk tabel transfer */
#tf-history { list-style: none; padding: 0; }
#tf-history .tbl th { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; padding: 9px 10px; }

/* ===== RIWAYAT PINDAH DANA — Tabel & Cards ===== */

/* Wrapper tabel */
.tf-tbl-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(167,139,250,0.1);
  background: rgba(255,255,255,0.015);
  /* Pastikan border-radius tidak clip td pertama/terakhir */
  isolation: isolate;
}
/* ── Summary grid responsive ─────────────────────────── */
.tf-sum-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Filter wrapper ──────────────────────────────────── */
.tf-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.tf-filter-row1,
.tf-filter-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tf-filter-sel {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  box-sizing: border-box;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tf-filter-acc {
  /* rekening bisa panjang — biarkan truncate */
}
.tf-filter-search {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  box-sizing: border-box;
  min-width: 0;
}
.tf-filter-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.tf-count-label {
  font-size: 11px;
  color: var(--tx3);
  white-space: nowrap;
}

/* Desktop: filter jadi satu baris */
@media(min-width: 641px) {
  .tf-filter-wrap {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tf-filter-row1 {
    display: contents; /* lepas grid, anak jadi flex item langsung */
  }
  .tf-filter-row2 {
    display: contents;
  }
  .tf-filter-sel {
    width: auto;
    flex-shrink: 0;
  }
  #tf-f-m  { width: 120px; }
  #tf-f-y  { width: 92px;  }
  #tf-f-acc { width: 160px; }
  .tf-filter-search {
    flex: 1;
    min-width: 140px;
    width: auto;
  }
  .tf-filter-info {
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* Mobile: summary 2×2 */
@media(max-width: 640px) {
  .tf-sum-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  /* Summary card: font lebih kecil supaya tidak overflow di 2 kolom */
  .tf-sum-grid .mc { padding: 12px; }
  .tf-sum-grid .mv { font-size: 14px !important; letter-spacing: -0.01em; }
  .tf-sum-grid .ml { font-size: 9px; }
  .tf-sum-grid .ms { font-size: 10px; }
  /* Filter row2: rekening full width, search full width */
  .tf-filter-row2 {
    grid-template-columns: 1fr;
  }
  .tf-filter-search {
    width: 100%;
  }
  /* Pagination: wrap rapi */
  #tf-pagination .pg-btn { min-width: 30px; height: 30px; font-size: 12px; }
}

/* ── Kolom pertama tabel ─────────────────────────────── */
/* Kolom pertama tabel — padding kiri konsisten dengan border-radius wrapper */
.tf-tbl thead th:first-child,
.tf-tbl-row td:first-child {
  padding-left: 16px !important;
}
/* Kolom terakhir tabel — padding kanan */
.tf-tbl thead th:last-child,
.tf-tbl-row td:last-child {
  padding-right: 12px !important;
}
.tf-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tf-tbl thead tr {
  background: rgba(28,31,53,0.7);
  border-bottom: 1px solid rgba(167,139,250,0.1);
}
.tf-tbl thead th {
  font-size: 9px;
  font-weight: 700;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: .09em;
  white-space: nowrap;
  border: none;
  font-family: -apple-system,'Inter','Roboto','Segoe UI',sans-serif;
}

/* Row hover */
.tf-tbl-row { transition: background .12s; }
.tf-tbl-row:hover { background: rgba(167,139,250,0.055) !important; }
.tf-tbl-row td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.035); color: var(--tx); vertical-align: middle; }
.tf-tbl-row:last-child td { border-bottom: none; }

/* Kolom # nomor */
.tf-td-num {
  padding-left: 16px !important;
  padding-right: 6px !important;
  font-size: 10px;
  color: var(--tx3);
  font-family: var(--mono);
  width: 44px;
  min-width: 44px;
}

/* Kolom Tanggal */
.tf-td-date {
  white-space: nowrap;
  font-size: 12px;
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
}

/* Kolom Deskripsi */
.tf-td-desc { max-width: 220px; }
.tf-desc-text {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  line-height: 1.4;
}

/* FX badge */
.tf-fx-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(251,191,36,0.1);
  color: var(--am);
  border: 1px solid rgba(251,191,36,0.2);
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: .04em;
}

/* FX sub-amount */
.tf-fx-sub {
  font-size: 10px;
  color: var(--tx3);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  line-height: 1.3;
}

/* Kolom Dari / Ke — chip rekening */
.tf-td-acc { white-space: nowrap; }
.tf-acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 5px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
}
.tf-acc-from {
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.12);
  color: var(--tx);
}
.tf-acc-to {
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.12);
  color: var(--tx);
}
.tf-acc-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tf-dot-from { background: rgba(248,113,113,0.8); }
.tf-dot-to   { background: rgba(74,222,128,0.8); }
.tf-acc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

/* Kolom Nominal */
.tf-td-amt {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--tx);
  font-size: 13px;
}

/* Kurs badge */
.tf-kurs-badge { font-size: 9px !important; letter-spacing: .04em; }

/* Kolom Aksi */
.tf-td-aksi { text-align: center; padding-right: 10px !important; }
.tf-act-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Tombol aksi — softer, semi-transparent */
.tf-btn {
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: transparent;
  transition: all .15s ease;
  flex-shrink: 0;
  opacity: .7;
}
.tf-btn:hover { opacity: 1; }
.tf-btn-edit {
  border-color: rgba(96,165,250,0.15);
  color: var(--bl);
}
.tf-btn-edit:hover {
  background: rgba(96,165,250,0.1);
  border-color: rgba(96,165,250,0.4);
  color: var(--bl);
  opacity: 1;
}
.tf-btn-detail {
  border-color: rgba(167,139,250,0.15);
  color: var(--pu);
}
.tf-btn-detail:hover {
  background: rgba(167,139,250,0.1);
  border-color: rgba(167,139,250,0.35);
  color: var(--pu);
  opacity: 1;
}
.tf-btn-del {
  border-color: rgba(248,113,113,0.12);
  color: var(--rd);
}
.tf-btn-del:hover {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.3);
  opacity: 1;
}

/* ── Mobile card: tf-mcard ─────────────────── */
.tf-mcard {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(167,139,250,0.08);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.tf-mcard:hover { background: rgba(167,139,250,0.04); border-color: rgba(167,139,250,0.18); }

/* Baris atas: deskripsi + nominal */
.tf-mcard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.tf-mcard-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.tf-mcard-amt {
  font-size: 13px;
  font-weight: 700;
  color: var(--bl);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Baris tengah: dari → ke */
.tf-mcard-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tf-flow-arrow {
  color: var(--tx3);
  flex-shrink: 0;
  opacity: .6;
}

/* Baris bawah: tanggal + badge + aksi */
.tf-mcard-foot {
  display: flex;
  align-items: center;
  gap: 7px;
}
.tf-mcard-date {
  font-size: 11px;
  color: var(--tx3);
}

/* Hide mobile cards on desktop, show on mobile (mirrors dt-cards) */
@media(min-width:641px){ #tf-cards .tf-mcard { display: none; } }
@media(max-width:640px){ .tf-tbl-wrap { display: none; } }

/* ===== EDIT TRANSAKSI MODAL — sama persis dengan detail modal ===== */
.etx-box {
  background: #131627;
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 16px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  animation: txPopIn .18s ease;
  margin: 16px;
}
.etx-head {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(167,139,250,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.etx-title {
  font-size: 11px; font-weight: 600; color: var(--pu);
  letter-spacing: .06em; text-transform: uppercase;
}
.etx-body { padding: 20px; }
.etx-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.etx-field { display: flex; flex-direction: column; gap: 5px; }
.etx-label {
  font-size: 10px; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .06em;
}
.etx-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--tx);
  font-family: inherit;
  transition: border .15s;
  outline: none;
  width: 100%;
}
.etx-input:focus { border-color: rgba(167,139,250,0.5); background: rgba(167,139,250,0.05); }
.etx-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--tx);
  font-family: inherit;
  transition: border .15s;
  outline: none;
  width: 100%;
  cursor: pointer;
}
.etx-select:focus { border-color: rgba(167,139,250,0.5); }
.etx-input[type="date"] { color-scheme: dark; }
/* Responsive */
@media(max-width:480px){
  .etx-grid { grid-template-columns: 1fr; }
  .etx-box { margin: 8px; }
}

