/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  margin: 0;
  padding: 20px;
  background-color: #f8f9fa;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

h1 {
  margin: 0;
  color: #212529;
}

.subtitle {
  color: #6c757d;
  font-size: 14px;
  margin: 5px 0 0 0;
}

/* Button styles */
.primary-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn:hover {
  background-color: #0056b3;
}

.primary-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.secondary-btn {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.secondary-btn:hover {
  background-color: #545b62;
}

.secondary-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Table styles */
.lists-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.lists-table th,
.lists-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.lists-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lists-table tr:hover {
  background-color: #f8f9fa;
}

.lists-table tr:last-child td {
  border-bottom: none;
}

/* List type badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.85em;
}

.badge-type-properties {
  background-color: #e3f2fd;
  color: #1976d2;
}

.badge-type-leads {
  background-color: #e8f5e9;
  color: #388e3c;
}

.badge-type-mixed {
  background-color: #fff3e0;
  color: #f57c00;
}

.badge-lead {
  background-color: #e8f5e9;
  color: #388e3c;
}

.badge-property {
  background-color: #e3f2fd;
  color: #1976d2;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: capitalize;
  font-size: 0.85em;
}

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

.status-sent, .status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-archived, .status-failed {
  background-color: #f8d7da;
  color: #721c24;
}

.status-draft {
  background-color: #e7f3ff;
  color: #004085;
}

/* Performance indicators */
.performance-good {
  color: #28a745;
  font-weight: 600;
}

.performance-medium {
  color: #ffc107;
  font-weight: 600;
}

.performance-poor {
  color: #dc3545;
  font-weight: 600;
}

/* Action buttons in table */
.actions-cell {
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.action-buttons button {
  background-color: transparent;
  border: 1px solid #dee2e6;
  color: #6c757d;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.action-buttons button:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.btn-view:hover {
  color: #007bff;
  border-color: #007bff;
}

.btn-edit:hover {
  color: #28a745;
  border-color: #28a745;
}

.btn-delete:hover {
  color: #dc3545;
  border-color: #dc3545;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  position: relative;
  background-color: white;
  margin: 50px auto;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content h2 {
  margin-top: 0;
  color: #212529;
}

.list-detail-modal {
  max-width: 1000px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #dee2e6;
}

.modal-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6c757d;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: #f8f9fa;
  color: #212529;
}

.modal-body {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

/* List stats bar */
.list-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 28px;
  color: white;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
}

/* List items table */
.list-items-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  margin-top: 20px;
}

.list-items-table th,
.list-items-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.list-items-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 13px;
}

.list-items-table tr:hover {
  background-color: #f8f9fa;
}

.btn-remove-item {
  background-color: transparent;
  border: 1px solid #dee2e6;
  color: #dc3545;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-remove-item:hover {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}

/* Form styles */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #495057;
  font-weight: 500;
  font-size: 14px;
}

input[type='text'],
input[type='number'],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  transition: border-color 0.2s;
}

input[type='text']:focus,
input[type='number']:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

select {
  background-color: white;
  cursor: pointer;
}

.button-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Helper styles */
.help-text {
  font-size: 0.85em;
  color: #6c757d;
  margin-top: 4px;
}

.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .lists-table {
    font-size: 14px;
  }

  .lists-table th,
  .lists-table td {
    padding: 10px 12px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .list-stats {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
    margin: 20px auto;
  }

  .list-detail-modal {
    width: 98%;
  }
}

