/* Original table styles */
thead.table-custom-green th {
  background-color: #70ad38;
  color: white;
  white-space: nowrap;
}

tbody tr {
  background-color: #f0f8ff;
}

tbody tr:nth-child(even) {
  background-color: #e6f2ff;
}

td, th {
  vertical-align: middle;
}

td {
  font-size: .9rem;
}

/* Optional: Let long text wrap in Address */
td:nth-child(4) {
  white-space: normal;
}

/* Action Button Table Style */
.btn-group {
  display: inline-flex;
  gap: 5px;
}

.btn-group > .btn {
  position: relative;
  border-radius: 0.25rem !important;
  margin: 0 !important;
}

/* Button styles */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
}

.btn-group .btn {
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-info {
  background-color: #17a2b8;
  border-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #117a8b;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-group .btn {
  transition: all 0.2s ease;
}

.btn-group .btn:hover {
  transform: translateY(-2px);
}

.btn-danger:hover {
  animation: pulse-danger 1s infinite;
}

@keyframes pulse-danger {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

.field .label {
  display: none; /* hide labels on desktop */
}

@media (max-width: 768px) {
  .table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none; /* hide table header */
  }

  tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  tbody tr {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: .5rem;
    background-color: transparent; /* 🔹 make background transparent */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  td {
    border: none;
    padding: 0.4rem 0;
    background-color: transparent; /* 🔹 transparent cells */
  }

  .field {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 0.10rem;
  }

  .field .label {
    display: inline-block;
    font-weight: 600;
    color: #70ad38;
    min-width: 100px; /* aligns labels */
    text-align: left;
  }

  /* center action buttons */
  .btn-group {
    justify-content: center;
    display: flex;
    gap: 8px;
  }
}



/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
  .table-responsive {
    font-size: 0.85rem;
  }

  .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
  }
}