.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 24px;  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 8px; font-size: 0.85em; }
.toolbar-left select {
  font-size: 0.85em; font-family: inherit;
  padding: 6px 28px 6px 10px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: inherit; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color 0.2s;
}
.toolbar-left select:hover { border-color: #bbb; }
.toolbar-left select:focus { outline: none; border-color: #2d6a4f; }

.search-box { position: relative; min-width: 260px; }
.search-box svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #999; pointer-events: none;
}
.search-box input {
  font-size: 14px; font-family: inherit; width: 100%;
  padding: 9px 14px 9px 38px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input::placeholder { color: #999; }
.search-box input:hover { border-color: #bbb; }
.search-box input:focus { outline: none; border-color: #2d6a4f; box-shadow: 0 0 0 3px rgba(45,106,79,0.1); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }

.qld-table {     border-radius: 0rem;}

thead th {
  padding: 14px 20px; text-align: left; font-weight: 600; font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: #fafafa; border-bottom: 1px solid #ddd;
  white-space: nowrap; cursor: pointer; user-select: none; transition: color 0.15s;
}
thead th:hover { color: #2d6a4f; }
thead th .sort-icon { display: inline-block; margin-left: 4px; opacity: 0.3; font-size: 10px; transition: opacity 0.15s; }
thead th.sort-asc .sort-icon, thead th.sort-desc .sort-icon { opacity: 1; color: #2d6a4f; }

tbody tr { border-bottom: 1px solid #eee; transition: background 0.15s; }
tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover { background: #f5f5f5; }
tbody td { padding: 13px 20px; font-size: 14px; line-height: 1.45; white-space: nowrap; }
tbody td:first-child { font-weight: 500; }

.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-top: 1px solid #ddd;
  font-size: 13px; flex-wrap: wrap; gap: 12px;
}
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination button {
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: inherit; cursor: pointer;
  transition: all 0.15s; min-width: 34px; text-align: center;
}
.pagination button:hover:not(:disabled):not(.active) { border-color: #bbb; background: #fafafa; }
.pagination button.active { background: #2d6a4f; border-color: #2d6a4f; color: #fff; }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination .ellipsis { padding: 6px 4px; color: #999; font-size: 13px; }

.state-message { text-align: center; padding: 60px 20px; color: #999; font-size: 14px; }
.state-message .icon { font-size: 2em; margin-bottom: 12px; display: block; }
.spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 2.5px solid #ddd; border-top-color: #2d6a4f;
  border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #888;
  padding: 2px 6px;
  border-radius: 50%;
  transition: color .15s, background .15s;
}

.search-clear-btn:hover {
  color: #333;
  background: rgba(0, 0, 0, .08);
}

.search-clear-btn:focus-visible {
  outline: 2px solid #2d6a4f;
  outline-offset: 2px;
}

#searchField {
  padding-right: 32px;
}

/* ═══════════════════════════════════════════════
   NEW: Filter dropdowns (LGA & Purpose)
   ═══════════════════════════════════════════════ */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 0 24px 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label {
  font-size: 0.85em;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
}

.filter-select {
  font-size: 0.85em;
  font-family: inherit;
  padding: 6px 28px 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  appearance: none;
  min-width: 170px;
  max-width: 260px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}

.filter-select:hover {
  border-color: #bbb;
}

.filter-select:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.clear-filters-btn {
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 500;
  padding: 6px 14px;
  color: #2d6a4f;
  background: transparent;
  border: 1px solid #2d6a4f;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.clear-filters-btn:hover {
  background: #2d6a4f;
  color: #fff;
}

.clear-filters-btn:focus-visible {
  outline: 2px solid #2d6a4f;
  outline-offset: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
    font-size: 0.85rem;
  }

  thead th,
  tbody td {
    padding: 6px 8px;
    white-space: nowrap;
  }

  #searchField {
    width: 100%;
    box-sizing: border-box;
  }

  .search-clear-btn {
    right: 10px;
  }
}

@media (max-width: 640px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { min-width: unset; }
  thead th { padding: 10px 12px; font-size: 11px; }
  tbody td { padding: 10px 12px; font-size: 13px; }
  .table-footer { flex-direction: column; align-items: flex-start; }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
    padding: 0 20px 16px;
  }

  .filter-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .filter-select {
    width: 100%;
    max-width: 100%;
    min-width: unset;
    box-sizing: border-box;
  }

  .clear-filters-btn {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  table { min-width: 480px; font-size: 0.78rem; }

  thead th,
  tbody td { padding: 4px 6px; }
}