.payments-container {
  max-width: 1200px;
  width: 100%;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ddd;
}

.header h2 {
  color: #333;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.refresh-btn,
.back-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.refresh-btn {
  background-color: #28a745;
  color: white;
}

.refresh-btn:hover {
  background-color: #218838;
}

.back-btn {
  background-color: #6c757d;
  color: white;
  display: inline-block;
}

.back-btn:hover {
  background-color: #5a6268;
}

.filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 14px;
  color: #555;
  font-weight: bold;
}

.filter-group select,
.filter-group input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.loading,
.error {
  text-align: center;
  padding: 20px;
  font-size: 16px;
}

.loading {
  color: #007bff;
}

.error {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

.payments-table-container {
  background-color: #fff;
  border-radius: 4px;
  overflow-x: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payments-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
}

.payments-table th {
  background-color: #f8f9fa;
  color: #495057;
  font-weight: bold;
  padding: 12px 8px;
  text-align: left;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.payments-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #dee2e6;
  font-size: 13px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Specific column widths */
.payments-table th:nth-child(1),
.payments-table td:nth-child(1) {
  max-width: 300px;
  min-width: 250px;
  width: 300px;
}

.payments-table tbody tr:hover {
  background-color: #f8f9fa;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-created {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-bank_selected {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.status-processing {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-pending {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-completed {
  background-color: #e8f5e8;
  color: #388e3c;
}

.status-failed {
  background-color: #ffebee;
  color: #d32f2f;
}

.status-unknown {
  background-color: #f5f5f5;
  color: #757575;
}

.pb2b-status {
  font-size: 11px;
  color: #666;
  max-width: 100px;
}

.action-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  background-color: #007bff;
  color: white;
  transition: background-color 0.3s ease;
}

.action-btn:hover {
  background-color: #0056b3;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 15px;
}

.pagination button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background-color: #fff;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

.pagination button:hover:not(:disabled) {
  background-color: #f8f9fa;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination .active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-info {
  color: #666;
  font-size: 14px;
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.modal-header h3 {
  margin: 0;
  color: #495057;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

.modal-body {
  padding: 20px;
}

.detail-group {
  margin-bottom: 15px;
}

.detail-group label {
  font-weight: bold;
  color: #495057;
  display: block;
  margin-bottom: 5px;
}

.detail-group .value {
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  word-break: break-all;
}

.webhook-data {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  max-height: 300px;
  overflow-y: auto;
}

.webhook-data pre {
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .header-actions {
    justify-content: center;
  }

  .filters {
    flex-direction: column;
  }

  .payments-table-container {
    overflow-x: scroll;
  }

  .modal-content {
    width: 95%;
    margin: 2% auto;
  }
}
