/* Reset any conflicting styles */
.filter-form-container * {
  box-sizing: border-box;
}

.filter-form-container {
  margin: 20px 0 30px;
  padding: 0;
}

.agent-id-card {
  background: white;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.id-card-top-bar {
  background: linear-gradient(135deg, #d93f45, #fff3f3);
  padding: 10px 25px;
  display: flex;
  justify-content: space-between;
  color: white;
}

.id-card-main {
  display: flex;
  padding: 20px;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.id-photo-frame img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

/* SEPARATE FILTER FORM - Completely independent */
.filter-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f6;
}

.filter-header h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.filter-header h4 i {
  color: #d93f45;
  margin-right: 8px;
}

.filter-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.filter-field {
  flex: 1;
  min-width: 160px;
}

.filter-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.filter-field label i {
  margin-right: 5px;
  color: #d93f45;
}

.filter-field input,
.filter-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: white;
  transition: all 0.2s;
}

.filter-field input:focus,
.filter-field select:focus {
  outline: none;
  border-color: #d93f45;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.price-group {
  display: flex;
  gap: 8px;
}

.price-group input {
  width: 50%;
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.btn-apply {
  background: linear-gradient(135deg, #d93f45, #d93f45);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-clear {
  background: #f1f5f9;
  color: #64748b;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-clear:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Active filters badges */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eef2f6;
}

.filter-badge {
  background: #d93f45;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-badge a {
  text-decoration: none;
  color: #94a3b8;
}

.filter-badge a:hover {
  color: #ef4444;
}

/* Properties grid */
.properties-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.properties-title {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  position: relative;
  display: inline-block;
}

.properties-title:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #d93f45, #764ba2);
  border-radius: 2px;
}

.results-count {
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  color: #64748b;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.property-item {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f6;
  text-decoration: none;
  color: inherit;
  display: block;
}

.property-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.12);
  border-color: #d93f4520;
}

.property-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.property-item:hover .property-image img {
  transform: scale(1.05);
}

.property-type {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #d93f45, #d93f45);
  color: white;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
}

.property-details {
  padding: 16px;
}

.property-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px;
  line-height: 1.4;
}

.property-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.property-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #d93f45;
}

.property-meta i {
  color: #d93f45;
  font-size: 13px;
}

.property-price {
  font-size: 20px;
  font-weight: 800;
  color: #d93f45;
  margin: 12px 0;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #f8fafc;
  color: #d93f45;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.property-item:hover .view-btn {
  background: linear-gradient(135deg, #d93f45, #f0eff1);
  color: white;
}

/* Pagination */
.pagination-wrapper {
  margin-top: 40px;
  text-align: center;
}

.pagination {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
}

.pagination .active .page-link {
  background: linear-gradient(135deg, #d93f45, #764ba2);
  border-color: #d93f45;
  color: white;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #f8fafc;
  border-radius: 16px;
}

.empty-state i {
  font-size: 60px;
  color: #cbd5e1;
  margin-bottom: 15px;
}

.empty-state h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .id-card-main {
    flex-direction: column;
    text-align: center;
  }

  .filter-form-row {
    flex-direction: column;
  }

  .filter-actions {
    flex-direction: column;
  }

  .btn-apply,
  .btn-clear {
    width: 100%;
    justify-content: center;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }

  .properties-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}
