body {
    background: #f1f5f9;
    font-family: "Nunito Sans", sans-serif;
}
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}
.page-title {
    background: linear-gradient(135deg, #1a8fd4, #38adef);
    color: #fff;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(56, 173, 239, 0.3);
}
.page-title h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}
.page-title p {
    font-size: 12px;
    opacity: 0.85;
    margin: 4px 0 0;
}
.card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 14px;
}
.form-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.18s;
    margin-bottom: 10px;
    font-family: inherit;
    box-sizing: border-box;
}
.form-input:focus {
    border-color: #38adef;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(56, 173, 239, 0.13);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
@media (max-width: 520px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
.btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background: linear-gradient(135deg, #1a8fd4, #38adef);
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 173, 239, 0.3);
}
.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-qris {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}
.btn:active {
    transform: scale(0.98);
}
.total-box {
    background: #f0fdf4;
    border: 1.5px solid #a7f3d0;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.total-box .lbl {
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
}
.total-box .val {
    font-weight: 800;
    color: #059669;
    font-size: 16px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
th {
    background: #1a8fd4;
    color: #fff;
    padding: 10px 8px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
}
th:first-child {
    border-radius: 8px 0 0 0;
}
th:last-child {
    border-radius: 0 8px 0 0;
    text-align: center;
}
td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
}
tr:hover td {
    background: #f8fafc;
}
.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn.edit {
    background: #eff6ff;
    color: #2563eb;
}
.empty-state {
    text-align: center;
    padding: 30px 16px;
    color: #94a3b8;
    font-size: 13px;
    border: 1.5px dashed #e2e8f0;
    border-radius: 10px;
}
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #0f172a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.25s;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success {
    background: #065f46;
}
.toast.error {
    background: #991b1b;
}
.back-link {
    display: block;
    text-align: center;
    margin: 16px 0;
    color: #1a8fd4;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}
.date-info {
    background: #ebf7ff;
    border: 1.5px solid #c8e9fa;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #1a8fd4;
    font-weight: 600;
    text-align: center;
}

/* ===== MODAL UMUM / QRIS / AKSI ===== */
.qris-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.qris-modal.active {
    display: flex;
}
.qris-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}
.qris-modal-content h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.qris-modal-content p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}
.qris-modal-content img {
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
}
.btn-back {
    margin-top: 10px;
    background: #64748b;
    color: #fff;
}

/* ===== BUKTI BAYAR ===== */
.bukti-container {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
}
.bukti-container img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
}
.bukti-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  padding: 20px;
  border: 1.5px dashed #e2e8f0;
  border-radius: 10px;
  width: 100%;
}

/* ===== EDIT BUKTI PREVIEW ===== */
.edit-bukti-preview {
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
}
.edit-bukti-preview img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
}
.btn-hapus-bukti {
  position: absolute;
  top: 4px;
  right: calc(50% - 94px);
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.btn-hapus-bukti:hover {
  background: #dc2626;
}

/* ===== FIX: Modal Edit Harus Bisa Scroll ===== */
.qris-modal-content {
  max-height: 90vh;           /* Batasi tinggi modal */
  overflow-y: auto;           /* Scroll vertikal jika konten panjang */
  display: flex;
  flex-direction: column;
}

/* Preview gambar di modal edit - batasi tinggi */
#editBuktiLama img,
#editBuktiPreviewImg {
  max-height: 200px;          /* Batasi tinggi preview */
  object-fit: contain;        /* Pertahankan rasio aspek */
  width: auto;
  max-width: 100%;
}

/* Tombol hapus bukti - posisikan lebih baik */
.btn-hapus-bukti {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

.btn-hapus-bukti:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Wrapper preview bukti di edit */
.edit-bukti-preview {
  position: relative;
  display: inline-block;
  margin: 8px auto;
  text-align: center;
  max-width: 100%;
}

/* Pastikan tombol di modal tetap terlihat */
.qris-modal-content .btn {
  margin-top: 12px;
  flex-shrink: 0;             /* Jangan biarkan tombol mengecil */
}