.custom-modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}
.custom-modal-dialog {
  background: #fff;
  border-radius: 12px;
  max-width: 340px;
  width: 100%;
  margin: auto;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  padding: 0;
  animation: modalIn 0.2s;
  box-sizing: border-box;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.custom-modal-header {
  padding: 1.2rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.custom-modal-header h5 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}
.custom-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}
.modal-form .form-floating {
  margin-bottom: 1.1rem;
}
.custom-modal .modal-footer {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 0.5rem;
  padding: 1.5rem 2rem 1.5rem 2rem !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid #eee;
  box-sizing: border-box;
}
.modal-footer .btn {
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}
.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0 0.5rem;
  transition: color 0.2s;
}
.btn-close:hover {
  color: #d32f2f;
}
.btn.btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 0.3rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn.btn-primary:hover {
  background: #1746a2;
}
.btn.btn-secondary {
  background: #e0e0e0;
  color: #333;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 0.3rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn.btn-secondary:hover {
  background: #bdbdbd;
}
.form-control, select.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #bdbdbd;
  border-radius: 0.3rem;
  background: #fafbfc;
  margin-bottom: 0.2rem;
  transition: border 0.2s;
}
.custom-modal .custom-modal-dialog {
  max-width: 600px;
  width: 100%;
}
.custom-modal .form-control {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px;
  font-size: 1rem;
  border-radius: 0.3rem;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: #2563eb;
  outline: none;
}
label {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.2rem;
}
.amount-col {
  width: 110px;
  text-align: right;
}
.date-col {
  width: 120px;
  white-space: nowrap;
}
.actions-col {
  width: 80px;
  text-align: center;
  white-space: nowrap;
}

/* Row background colors - override Bootstrap table variables */
.table-transactions tbody tr[style*="#fff9e6"] {
  --bs-table-bg: #fffbf0 !important;
  --bs-table-accent-bg: transparent !important;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}
.table-transactions tbody tr[style*="#e6f7e6"] {
  --bs-table-bg: #f5fdf5 !important;
  --bs-table-accent-bg: transparent !important;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

/* Hover effects */
.table-transactions tbody tr[style*="#fff9e6"]:hover {
  --bs-table-bg: #fff9e6 !important;
  border-left-color: #ffc107;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}
.table-transactions tbody tr[style*="#e6f7e6"]:hover {
  --bs-table-bg: #e6f7e6 !important;
  border-left-color: #198754;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15);
}

/* Table header styling - light blue background */
.table-transactions thead th {
  background: linear-gradient(135deg, #cfe2ff 0%, #e7f1ff 100%) !important;
  color: #052c65 !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #0d6efd !important;
  padding: 0.75rem 0.5rem !important;
}

/* Hide horizontal scrollbar in table-responsive */
.table-responsive {
  overflow-x: hidden !important;
}

/* For tables that actually need scrolling, show it only when necessary */
.table-responsive::-webkit-scrollbar {
  display: none;
}
.table-responsive {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
