body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-content {
  min-height: 100vh;
  padding: 2rem;
  background-color: #f8f9fa;
}

.table-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.page-header {
  background-color: DodgerBlue;
  color: White;
  text-align: center;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.action-buttons button {
  margin-right: 5px;
}

.modal-content {
  border-radius: 1rem;
}

.form-control {
  border-radius: 0.5rem;
}

.btn-primary, .btn-danger, .btn-success {
  border-radius: 0.5rem;
}

.toast-container {
  z-index: 1100;
}

.form-control:invalid {
  border-color: #dc3545;
}

@media (max-width: 768px) {
  .table-wrapper { padding: 1rem; }
  table { font-size: 0.85rem; }
}

/* ===== Dark Mode Overrides ===== */
[data-bs-theme="dark"] .main-content {
  background-color: #18191a;
}

[data-bs-theme="dark"] .table-wrapper {
  background: #212529;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .page-header {
  background-color: #0d6efd; /* Keep brand color */
  color: white;
}

/* ===== Internet Plans Page Styles ===== */
.plan-group {
  margin-bottom: 2.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.plan-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0d6efd;
  border-bottom: 2px solid #0d6efd;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.plan-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.plan-details p {
  margin: 0;
}

[data-bs-theme="dark"] .plan-group-header {
  color: #3c91ff; /* Lighter blue for dark bg */
  border-bottom-color: #3c91ff;
}

[data-bs-theme="dark"] .plan-group {
  border-color: #495057;
}

/* ===== Customer Search Page Styles ===== */
.search-form .input-group-text {
  width: 130px;
  justify-content: center;
  font-weight: 600;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-right: none;
}

.search-result-card {
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease-in-out;
}

.search-result-card:hover {
  transform: scale(1.02);
}

.search-result-card .card-header {
  font-weight: 600;
  background-color: #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
}

.search-result-card .card-header div:first-child {
  color: #212529;
}

.search-result-card .card-header div:last-child {
  color: #198754;
  font-weight: 700;
}

.search-result-card .card-body .card-text strong {
  display: inline-block;
  width: 160px;
  color: #333;
}

.search-result-card .details {
  display: none;
  transition: all 0.3s ease-in-out;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  margin-top: 10px;
}

/* Dark Mode for Search Page */
[data-bs-theme="dark"] .search-form { background-color: #2b3035; }
[data-bs-theme="dark"] .search-form .input-group-text { background-color: #343a40; border-color: #495057; }
[data-bs-theme="dark"] .search-result-card { background-color: #2b3035; border-color: #495057; }
[data-bs-theme="dark"] .search-result-card .card-header { background-color: #343a40; border-bottom-color: #495057; }
[data-bs-theme="dark"] .search-result-card .card-header div:first-child,
[data-bs-theme="dark"] .search-result-card .card-body .card-text strong { color: #e9ecef; }
[data-bs-theme="dark"] .search-result-card .details { border-top-color: #495057; }

/* Responsive styles for search cards */
@media (max-width: 575.98px) {
  .search-result-card .card-header { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 1rem; }
  .search-result-card .card-header div:last-child { align-self: flex-end; }
  .search-result-card .card-body .card-text strong { display: block; width: auto; margin-top: 0.75rem; }
  .search-result-card .card-body .card-text strong:first-child { margin-top: 0; }
  .search-result-card .card-body .card-text br { display: none; }
}