/* =========================================================================
   PROFILE PAGE
   ========================================================================= */
.profile-hero {
  background: var(--paper-50);
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--paper-100);
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.profile-photo {
  position: relative;
  width: 108px;
  height: 108px;
  flex-shrink: 0;
}
.profile-photo__ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brass-300), transparent 25%, var(--brass-500) 55%, transparent 85%, var(--brass-300));
  filter: blur(6px);
  opacity: 0.75;
  animation: rotateGlow 9s linear infinite;
}
.profile-photo__wrap {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--paper-0);
  box-shadow: var(--shadow-md);
  background: var(--ink-800);
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-identity h1 { font-size: clamp(26px, 3vw, 34px); }
.profile-identity__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
}
.profile-role-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--ink-950);
  color: var(--brass-300);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.profile-identity__sub { color: var(--ink-600); font-size: 14px; }
.profile-note {
  margin-top: var(--sp-2);
  font-size: 12.5px;
  color: var(--ink-400);
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-note svg { width: 13px; height: 13px; }

/* ---------- content grid ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.profile-card {
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--paper-100);
  background: var(--paper-0);
  box-shadow: var(--shadow-sm);
}
.profile-card h3 { font-size: 18px; margin-bottom: var(--sp-1); }
.profile-card__desc { font-size: 13px; color: var(--ink-600); margin-bottom: var(--sp-5); }

.account-facts { display: flex; flex-direction: column; gap: 0; }
.account-fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--paper-100);
  font-size: 14px;
}
.account-fact:last-child { border-bottom: none; }
.account-fact .k { color: var(--ink-600); }
.account-fact .v { font-family: var(--font-mono); font-weight: 600; color: var(--ink-950); }

@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* ---------- tab panels ---------- */
.tab-panel { display: none; padding-top: var(--sp-6); }
.tab-panel.is-active { display: block; animation: fieldOpen var(--dur-med) var(--ease-out); }

/* ---------- entity lists (family, vehicles, staff, documents, complaints, notices) ---------- */
.profile-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.profile-list-empty { color: var(--ink-400); font-size: 13.5px; padding: var(--sp-4) 0; }
.profile-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--paper-100);
  background: var(--paper-50);
  flex-wrap: wrap;
}
.profile-list-row__main { font-weight: 700; font-size: 14px; color: var(--ink-950); }
.profile-list-row__meta { font-size: 12.5px; color: var(--ink-600); margin-top: 2px; }
.profile-list-row__actions { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.profile-list-row__delete { font-size: 12px; color: var(--rust-600); background: none; border: none; cursor: pointer; }

.inline-add-form {
  display: none;
  margin-top: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid var(--paper-100);
  background: var(--paper-50);
}
.inline-add-form.is-visible { display: block; animation: fieldOpen var(--dur-med) var(--ease-out); }

/* ---------- status badges (compliance, registration status) ---------- */
.status-badge-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.status-badge-item { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--paper-50); border: 1px solid var(--paper-100); flex: 1; min-width: 160px; }
.status-badge-item .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-400); display: block; margin-bottom: 4px; }
.status-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700;
}
.status-pill--good { background: var(--sage-100); color: var(--sage-600); }
.status-pill--warn { background: var(--amber-100); color: var(--amber-600); }
.status-pill--bad { background: var(--rust-100); color: var(--rust-600); }
.status-pill--neutral { background: var(--paper-100); color: var(--ink-600); }

/* ---------- payments tab ---------- */
.outstanding-banner {
  padding: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--rust-100);
  border: 1px solid var(--rust-100);
  color: var(--rust-600);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.outstanding-banner strong { font-family: var(--font-mono); font-size: 18px; }
.payment-filter-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.payment-filter-row .field { margin-bottom: 0; min-width: 140px; }
