/*************************************************
 * Holy Circle Admin - People / Membership Page
 *************************************************/

/* Summary cards */
.people-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.people-summary-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.people-summary-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.people-summary-card p {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #002e6b;
}

/* Controls (sort + filters) */
.people-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-pill-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-pill {
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 0.8rem;
  cursor: pointer;
}

.filter-pill.active {
  background: #002e6b;
  color: #ffffff;
  border-color: #002e6b;
}

.people-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.people-filters input,
.people-filters select {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 0.86rem;
}


.people-filters .search-input {
  flex: 1 1 280px;
  max-width: 420px;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 0.95rem;
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

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

.people-filters .search-input:focus {
  outline: none;
  border-color: #bf9745;
  box-shadow:
    0 0 0 3px rgba(191, 151, 69, 0.18),
    0 10px 24px rgba(15, 23, 42, 0.06);
}

/* Full-width table */
.people-table {
  width: 100%;
  table-layout: fixed;
}

.people-table th,
.people-table td {
  padding: 0.85rem 0.9rem;
}

.people-table td {
  vertical-align: top;
  word-break: break-word;
}

.people-table td:last-child,
.people-table th:last-child {
  white-space: nowrap;
}

.people-table tbody tr:hover {
  background: #f9fafb;
}

/* Email cell copy button */
.email-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
}

.email-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-copy-btn {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #6b7280;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.email-copy-btn:hover {
  background: #f3f4ff;
  color: #002e6b;
}

.email-copy-btn:focus-visible {
  outline: 3px solid rgba(191, 151, 69, 0.28);
  outline-offset: 2px;
}

.email-copy-btn.copied {
  color: #166534;
}

.email-copy-btn.copy-failed {
  color: #b91c1c;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #e5f3ff;
  color: #1d4ed8;
}

/* Status & membership pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-visitor {
  background: #e5f3ff;
  color: #1d4ed8;
}

.status-member {
  background: #e0f2f1;
  color: #047857;
}

.status-volunteer {
  background: #fff7ed;
  color: #c05621;
}

.status-staff {
  background: #fef3c7;
  color: #92400e;
}

.membership-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
}

.membership-pending {
  background: #fef3c7;
  color: #92400e;
}

.membership-active {
  background: #dcfce7;
  color: #166534;
}

.membership-inactive {
  background: #e5e7eb;
  color: #374151;
}

.membership-terminated {
  background: #fee2e2;
  color: #b91c1c;
}

/* Table buttons */
.table-btn {
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  background: #f3f4ff;
  color: #111827;
}

.table-btn:hover {
  filter: brightness(0.95);
}

/* Modal (copied style from existing admin pages) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.modal-card h3 {
  margin: 0 0 0.8rem;
  color: #002e6b;
}

.modal-card label {
  display: block;
  margin: 0.7rem 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.modal-card input,
.modal-card select,
.modal-card textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* Form layout */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-field {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.form-field input,
.form-field textarea,
.form-field select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

.form-field textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.form-status {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Buttons */
.primary-btn {
  background: #002e6b;
  color: #ffffff;
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 0.89rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.primary-btn.small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.secondary-btn {
  background: #f3f4f6;
  color: #111827;
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 0.86rem;
  cursor: pointer;
}

.secondary-btn.small {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.secondary-btn.danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* Misc */
.empty-state {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
  .people-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .people-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-row {
    grid-template-columns: 1fr;
  }
}
