/* User Profile + Admin user list / edit modals — PropHog new UI (navy / gold / white) */
/* Scoped so classic lead cards keep their own look. */

/* ── Shared modals ── */
#passwordModal .modal-content,
#deleteUserModal .modal-content,
#addUserModal .modal-content,
#agencyModal .modal-content,
#editpopup .modal-content {
  background: var(--ph-surface, #fff);
  border: 1px solid var(--ph-border, #E2DDD4);
  border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(26, 34, 53, 0.35);
  overflow: hidden;
  font-family: 'Sora', sans-serif;
}
#passwordModal .modal-header,
#addUserModal .modal-header,
#agencyModal .modal-header,
#editpopup .modal-header {
  background: var(--ph-surface, #fff);
  border-bottom: 1px solid var(--ph-border, #E2DDD4);
  padding: 16px 22px;
}
#passwordModal .modal-title,
#addUserModal .modal-title,
#agencyModal .modal-title,
#editpopup .modal-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ph-navy, #1A2235);
  letter-spacing: -0.01em;
}
#passwordModal .modal-body,
#deleteUserModal .modal-body {
  padding: 22px 22px 20px;
  background: var(--ph-bg, #FAF8F4);
}
#addUserModal .modal-body {
  background: var(--ph-bg, #FAF8F4);
  padding: 20px 22px 12px;
}
#passwordModal .ph-filter-label,
#addUserModal .ph-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ph-muted, #857F78);
  margin-bottom: 6px;
}
#passwordModal .ph-filter-input,
#addUserModal .ph-filter-input,
#addUserModal .ph-filter-select,
#addUserModal .ph-filter-date {
  background: var(--ph-surface, #fff);
  border-color: var(--ph-border, #E2DDD4);
}
#passwordModal .ph-filter-group { margin-bottom: 14px; }
#passwordModal .ph-2cols {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-top: 8px;
}
#passwordModal .ph-btn-pill-sm,
#deleteUserModal .ph-btn-pill-sm {
  height: 42px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
}
#passwordModal .togglePassword {
  color: var(--ph-muted, #857F78);
}
#passwordModal .togglePassword:hover { color: var(--ph-navy, #1A2235); }
#deleteUserModal .modal-body h5 {
  font-family: 'Sora', sans-serif;
  font-weight: 650;
  color: var(--ph-navy, #1A2235);
  font-size: 16px;
  margin: 0;
}
#deleteUserModal .ph-delete-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* ── Member self-service profile ── */
.userProfile {
  padding: 8px 4px 24px;
  max-width: 720px;
  margin: 0 auto;
}
.profile-card {
  background: var(--ph-surface, #fff);
  border: 1px solid var(--ph-border, #E2DDD4);
  border-radius: 14px;
  box-shadow: 0 8px 28px -18px rgba(26, 34, 53, 0.35);
  overflow: hidden;
  width: 100%;
  margin: 8px auto 16px;
}
.profile-card .card-header {
  background: var(--ph-navy, #1A2235);
  color: #fff;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-card .user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.profile-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(230, 168, 23, 0.18);
  border: 1px solid rgba(230, 168, 23, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-card .avatar .ac-person {
  width: 28px;
  height: 28px;
  color: var(--ph-gold, #E6A817);
}
.profile-card .name-section h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  text-transform: none;
}
.profile-card .name-section .username {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  font-weight: 500;
}
.profile-card .status .badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-card .status .badge.active {
  background: rgba(22, 163, 74, 0.2);
  color: #7fe0a8;
  border: 1px solid rgba(127, 224, 168, 0.35);
}
.profile-card .status .badge.inactive {
  background: rgba(220, 38, 38, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.35);
}
.profile-card .card-body {
  padding: 22px 24px 8px;
}
.profile-card .contact-info {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.profile-card .contact-info .info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  color: var(--ph-text, #3A3530);
}
.profile-card .contact-info i {
  color: var(--ph-gold-lo, #B8860B);
  width: 18px;
  text-align: center;
}
.profile-card .starting-date {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--ph-border, #E2DDD4);
  border-radius: 10px;
  background: var(--ph-surface-2, #F5F3EE);
}
.profile-card .starting-date strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ph-muted, #857F78);
  margin-bottom: 4px;
}
.profile-card .usage-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: var(--ph-surface-2, #F5F3EE);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--ph-border, #E2DDD4);
  margin: 0 0 18px;
}
.profile-card .usage-item .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ph-muted, #857F78);
  display: block;
  margin-bottom: 4px;
}
.profile-card .usage-item .value {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ph-navy, #1A2235);
  font-variant-numeric: tabular-nums;
}
.profile-card .usage-left { color: var(--ph-red, #DC2626); }
.profile-card .states-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 18px;
}
.profile-card .states-section strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ph-muted, #857F78);
  margin-bottom: 6px;
}
.profile-card .states-list {
  font-size: 14px;
  font-weight: 600;
  color: var(--ph-navy, #1A2235);
  line-height: 1.4;
}
.profile-card .extra-info {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}
.profile-card .extra-info .info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13.5px;
  color: var(--ph-text, #3A3530);
}
.profile-card .extra-info strong {
  font-weight: 650;
  color: var(--ph-navy, #1A2235);
}
.profile-card .ph-chip {
  display: inline-block;
  background: var(--ph-surface-2, #F5F3EE);
  border: 1px solid var(--ph-border, #E2DDD4);
  color: var(--ph-navy, #1A2235);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 650;
}
.profile-card .ph-chip.empty {
  color: var(--ph-muted, #857F78);
  font-weight: 500;
}
.profile-card .api-section .api-row {
  margin-bottom: 14px;
}
.profile-card .api-section strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ph-muted, #857F78);
  margin-bottom: 6px;
}
.profile-card .api-input {
  background: var(--ph-surface, #fff) !important;
  border: 1px solid var(--ph-border, #E2DDD4) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ph-text, #3A3530);
}
.profile-card .card-footer {
  background: var(--ph-surface-2, #F5F3EE);
  padding: 14px 24px;
  text-align: center;
  border-top: 1px solid var(--ph-border, #E2DDD4);
}
.profile-card .btn-edit {
  background: var(--ph-navy, #1A2235);
  color: #fff;
  padding: 10px 22px;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.profile-card .btn-edit:hover {
  background: #243049;
  color: #fff;
}
@media (max-width: 640px) {
  .profile-card .usage-section,
  .profile-card .states-section {
    grid-template-columns: 1fr;
  }
  .profile-card .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Admin user cards (#usage_data) ── */
#usage_data .ac-card {
  background: var(--ph-surface, #fff);
  border: 1px solid var(--ph-border, #E2DDD4);
  border-radius: 12px;
  box-shadow: 0 6px 20px -16px rgba(26, 34, 53, 0.35);
}
#usage_data .ac-card.highlighted {
  background: var(--ph-surface, #fff);
  border-color: rgba(230, 168, 23, 0.55);
  box-shadow: inset 3px 0 0 var(--ph-gold, #E6A817), 0 6px 20px -16px rgba(26, 34, 53, 0.35);
}
#usage_data .ac-name {
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ph-navy, #1A2235);
  font-size: 14px;
}
#usage_data .ac-avatar {
  background: var(--ph-navy, #1A2235);
  color: var(--ph-gold, #E6A817);
}
#usage_data .ac-person { color: var(--ph-gold, #E6A817); }
#usage_data[data-view="grid"] .ac-card-header {
  background: var(--ph-surface-2, #F5F3EE);
  border-bottom: 1px solid var(--ph-border, #E2DDD4);
}
#usage_data[data-view="grid"] .ac-contact-block {
  border-bottom-color: var(--ph-border, #E2DDD4);
  background: var(--ph-surface, #fff);
}
#usage_data .ac-ct,
#usage_data .ac-ct a {
  color: var(--ph-navy, #1A2235);
}
#usage_data .ac-lbl { color: var(--ph-muted, #857F78); font-weight: 650; }
#usage_data .ac-val { color: var(--ph-text, #3A3530); }
#usage_data .ac-notes {
  background: var(--ph-surface-2, #F5F3EE);
  border-color: var(--ph-border, #E2DDD4);
  color: var(--ph-muted, #857F78);
  font-style: normal;
}
#usage_data .ac-actions-icons {
  background: var(--ph-surface-2, #F5F3EE);
  border-top: 1px solid var(--ph-border, #E2DDD4);
}
#usage_data .btn-navy { background: var(--ph-navy, #1A2235); }
#usage_data .btn-gold { background: var(--ph-gold, #E6A817); color: var(--ph-navy, #1A2235); }
#usage_data .btn-red { background: var(--ph-red, #DC2626); }

/* Admin list filters on user page */
.ph-page-user .ph-filter-panel {
  background: var(--ph-surface, #fff);
  border: 1px solid var(--ph-border, #E2DDD4);
  border-radius: 12px;
}
