/* Customers Page Styles */
.customers-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  margin-top: 70px;
}

/* Header */
.customers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.header-content h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-dark, #1f2937);
}

.header-content p {
  margin: 0;
  color: var(--text-muted, #6b7280);
}

/* Stats Cards */
.customer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color, #e5e7eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.5rem;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark, #1f2937);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.25rem;
}

/* Controls */
.customers-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.875rem;
}

.filter-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.filter-select,
.sort-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

/* Customer Grid */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.customer-card {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.customer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.customer-info h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-dark, #1f2937);
  font-size: 1.25rem;
}

.customer-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.customer-type.commercial {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.customer-type.residential {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.customer-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted, #6b7280);
}

.action-btn:hover {
  background: var(--hover-bg, #f3f4f6);
  color: var(--text-dark, #1f2937);
}

/* Customer Details */
.customer-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-light, #f9fafb);
  border-radius: 0.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-color, #374151);
}

.detail-item svg {
  color: var(--text-muted, #6b7280);
}

/* Customer Stats Row */
.customer-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color, #e5e7eb);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mini-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark, #1f2937);
}

.mini-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.25rem;
}

.rating {
  display: flex;
  gap: 2px;
}

/* Customer Tags */
.customer-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--primary-light, #dbeafe);
  color: var(--primary-color, #2563eb);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Customer Footer */
.customer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.last-project {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .customers-page {
    padding: 1rem;
  }

  .customers-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .customer-stats {
    grid-template-columns: 1fr 1fr;
  }

  .customers-controls {
    flex-direction: column;
  }

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

  .filter-controls {
    width: 100%;
    justify-content: space-between;
  }

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