/* ============================================================
   PBMS ADMIN — MODUL QRIS (dipisah dari dashboard.css)
   Catatan: memakai var(--bg-card), var(--success), var(--error),
   var(--radius-sm) — harus dimuat SETELAH dashboard.css.
   ============================================================ */

/* ── Modal: Pencatatan & Riwayat QRIS (Fix #25) ─────────────────── */

/* Card QRIS — aksen emerald/QRIS, hover border hijau */
.stat-card--qris {
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.stat-card--qris .stat-card__value {
  color: #10b981;
}

.stat-card--qris.stat-card--clickable:hover {
  border-color: #10b981;
}

/* Modal QRIS — z-index 1000: di atas burger drawer (997, Fix #80) */
#modalQrisHistory {
  z-index: 1000;
}

/* Filter bar: date range + dropdown status + search inline */
.qris-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.qris-filter-bar .tx-filter-search {
  flex: 1 1 200px;
  min-width: 180px;
}

/* Wrapper ringkasan QRIS — memuat .tx-chip yang sudah ada */
.qris-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Chip omzet QRIS hari ini — aksen emerald (warna QRIS) */
.tx-chip--qris-hari {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
}

.tx-chip--qris-hari .tx-chip__value {
  color: #10b981;
}

/* Chip total QRIS bulan ini — aksen biru/biru neon (pola kas net) */
.tx-chip--qris-bulan {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
}

.tx-chip--qris-bulan .tx-chip__value {
  color: #3b82f6;
}

/* Chip status pending — aksen kuning/amber (perlu perhatian admin) */
.tx-chip--qris-pending {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.tx-chip--qris-pending .tx-chip__value {
  color: #f59e0b;
}

/* Badge status verifikasi QRIS */
.badge-qris--terverifikasi {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-qris--pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-qris--batal {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Tombol aksi verifikasi QRIS — kecil, aksen biru, tidak mengganggu
   baris tabel */
.btn-qris-verify {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn-qris-verify:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
}

/* Kolom tabel QRIS — alokasi lebar & alignment proporsional */
#tableQrisHistory {
  width: 100%;
}
/* WAKTU & TANGGAL — kiri, kecil */
#tableQrisHistory th:nth-child(1),
#tableQrisHistory td:nth-child(1) {
  width: 140px;
  min-width: 130px;
  text-align: left;
  font-size: 0.8rem;
}
/* KODE TRANSAKSI — kiri fleksibel, monospace & bold */
#tableQrisHistory th:nth-child(2),
#tableQrisHistory td:nth-child(2) {
  width: 200px;
  min-width: 160px;
  text-align: left;
}
#tableQrisHistory td.col-qris-kode {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}
/* KASIR — kiri */
#tableQrisHistory th:nth-child(3),
#tableQrisHistory td:nth-child(3) {
  width: 100px;
  min-width: 90px;
  text-align: left;
}
/* NOMINAL — kanan, bold (sudah .col-num) */
#tableQrisHistory th:nth-child(4),
#tableQrisHistory td:nth-child(4) {
  width: 130px;
  min-width: 120px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
/* STATUS & AKSI — tengah, badge + tombol ber-gap rapi */
#tableQrisHistory th:nth-child(5),
#tableQrisHistory td:nth-child(5) {
  width: 150px;
  min-width: 140px;
  text-align: center;
}
#tableQrisHistory td.col-qris-status {
  display: table-cell;
  vertical-align: middle;
}
#tableQrisHistory td.col-qris-status .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px 0 0;
}

/* Scrollbar dark + hilangkan horizontal scrollbar — modal QRIS */
#modalQrisHistory .modal-table-wrap {
  overflow-x: hidden;
}
#modalQrisHistory .modal-table-wrap::-webkit-scrollbar,
#modalQrisHistory .modal-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
#modalQrisHistory .modal-table-wrap::-webkit-scrollbar-track,
#modalQrisHistory .modal-body::-webkit-scrollbar-track {
  background: #0f172a;
}
#modalQrisHistory .modal-table-wrap::-webkit-scrollbar-thumb,
#modalQrisHistory .modal-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
#modalQrisHistory .modal-table-wrap::-webkit-scrollbar-thumb:hover,
#modalQrisHistory .modal-body::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Filter input tanggal QRIS — teks & ikon kalender tak bertumpuk */
#modalQrisHistory .kas-date-field input[type="date"] {
  min-width: 155px;
  padding: 8px 32px 8px 12px;
}

/* Filter select status QRIS — tema gelap rapi */
#modalQrisHistory .qris-filter-bar select {
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Override warna card dalam tab (ada di dashboard.css, dipertahankan
   di sini agar modul mandiri bila dashboard.css berubah) */
.tab-panel .stat-card--qris .stat-card__value {
  color: #fbbf24;
}
