/* Public Procurement List Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Gilroy", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  padding: 40px 20px;
  color: #2c3e50;
}

.procurement-container {
  max-width: 1340px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: 50px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 15px;
}

.section-title .highlight {
  color: #0066cc;
}

.section-subtitle {
  text-align: center;
  color: #5a6c7d;
  font-size: 1.1rem;
  margin-bottom: 40px;
  line-height: 1.6;
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}

/* Table Styles */
.procurement-table-wrapper {
  margin-top: 20px;
}

.procurement-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0;
  table-layout: auto;
}

.procurement-table thead {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
}

.procurement-table thead th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.procurement-table thead th:nth-child(1) {
  /* width: 15%; */
  width: 200px;
}
.procurement-table thead th:nth-child(2) {
  /* width: 28%; */
  width: 350px;
}
.procurement-table thead th:nth-child(3) {
  /* width: 13%; */
  width: 170px;
}
.procurement-table thead th:nth-child(4) {
  /* width: 14%; */
  width: 200px;
}
.procurement-table thead th:nth-child(5) {
  /* width: 13%; */
  width: 120px;
}
.procurement-table thead th:nth-child(6) {
  /* width: 17%; */
  width: 160px;
}

.procurement-table thead th:first-child {
  border-radius: 12px 0 0 0;
}

.procurement-table thead th:last-child {
  border-radius: 0 12px 0 0;
}

.procurement-table tbody tr {
  background: white;
  transition: all 0.3s ease;
  border-bottom: 1px solid #e8ecf1;
}

.procurement-table tbody tr:hover {
  background: #f8fafc;
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.procurement-table tbody td {
  padding: 20px;
  font-size: 0.95rem;
  color: #2c3e50;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.procurement-table tbody td:nth-child(1) {
  font-weight: 600;
  color: #0066cc;
}

.procurement-table tbody td:nth-child(2) {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procurement-table tbody td:nth-child(2):hover {
  white-space: normal;
  overflow: visible;
}

.procurement-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 12px;
}

.procurement-table tbody tr:last-child td:last-child {
  border-radius: 0 0 12px 0;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-draft {
  background: #fff3cd;
  color: #856404;
}

.status-active {
  background: #d1e7dd;
  color: #0f5132;
}

.status-inactive {
  background: #e2e8f0;
  color: #475569;
}

/* View Details Button */
.btn-view {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.btn-view:hover {
  background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
  color: white;
  /* transform: translateY(-2px); */
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

/* Search Container */
.search-container {
  position: relative;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  font-size: 1rem;
  border: 2px solid #e8ecf1;
  border-radius: 50px;
  background: #f8fafc;
  transition: all 0.3s ease;
  font-family: "Gilroy", sans-serif;
  color: #2c3e50;
}

.search-input:focus {
  outline: none;
  border-color: #0066cc;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  pointer-events: none;
}

.clear-search {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: #e8ecf1;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1rem;
  color: #5a6c7d;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search:hover {
  background: #d1d5db;
  color: #2c3e50;
}

/* Status Filter */
.status-header-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.status-filter-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
}

.status-filter-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.status-filter-btn.active {
  background: rgba(255, 255, 255, 0.95);
  color: #0066cc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-filter-btn.active:hover {
  background: white;
  color: #0052a3;
}

.status-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  z-index: 1000;
  margin-top: 5px;
  overflow: hidden;
}

.status-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.9rem;
}

.status-dropdown-item:hover {
  background: #f8fafc;
  color: #0066cc;
}

.status-dropdown-item.active {
  background: #e6f2ff;
  color: #0066cc;
  font-weight: 600;
}

/* Loading and No Results */
.no-results {
  text-align: center;
  padding: 40px;
  color: #5a6c7d;
  font-size: 1.1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid #e8ecf1;
  border-top: 4px solid #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .section-subtitle {
    font-size: 14px;
    width: 100%;
    margin-bottom: 20px;
  }

  .procurement-container {
    padding: 30px 20px;
  }

  .section-title {
    font-size: 26px;
  }

  .procurement-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .procurement-table {
    min-width: 720px;
    font-size: 0.85rem;
  }

  .procurement-table thead th,
  .procurement-table tbody td {
    padding: 12px 10px;
  }

  .search-container {
    max-width: 100%;
  }
}
