/* ============================================================
   باغ جوزا — Family Archive
   Design concept: an illuminated Persian garden ledger.
   Parchment ground, indigo ink, gold leaf, madder-red marriage
   knots, sage-green descent. Branches drawn as garden vines,
   not office-chart boxes.
   ============================================================ */

:root {
  --ink: #241d16;
  --indigo: #1c3144;
  --indigo-deep: #142430;
  --parchment: #f3e9d2;
  --parchment-dim: #ece0c4;
  --parchment-deep: #e4d6b2;
  --gold: #b8862f;
  --gold-bright: #d4a24a;
  --madder: #8c3a34;
  --sage: #5b7a54;
  --sage-deep: #43593e;
  --line-soft: rgba(36, 29, 22, 0.16);

  --font-display: "Lalezar", "Vazirmatn", sans-serif;
  --font-body: "Vazirmatn", "Tahoma", sans-serif;

  --radius: 14px;
  --shadow-card: 0 2px 0 rgba(36,29,22,0.06), 0 10px 24px -14px rgba(36,29,22,0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  direction: rtl;
}

body {
  background-image:
    radial-gradient(circle at 15% 8%, rgba(184,134,47,0.08), transparent 40%),
    radial-gradient(circle at 85% 92%, rgba(91,122,84,0.08), transparent 45%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
}

::selection { background: var(--gold-bright); color: var(--ink); }

*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------- layout shell ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  color: var(--parchment);
  border-bottom: 3px solid var(--gold);
}

.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.5px;
  color: var(--parchment);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.brand small {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--gold-bright);
  font-weight: 500;
}

.header-search {
  flex: 1;
  position: relative;
  max-width: 420px;
}

.header-search input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(243,233,210,0.25);
  background: rgba(243,233,210,0.08);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 14px;
}

.header-search input::placeholder { color: rgba(243,233,210,0.55); }
.header-search input:focus { background: rgba(243,233,210,0.14); }

/* ---------------- language switch ---------------- */

.lang-switch {
  display: flex;
  flex-shrink: 0;
  border: 1px solid rgba(243,233,210,0.3);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(243,233,210,0.65);
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 7px 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.active {
  background: var(--gold);
  color: var(--indigo-deep);
  font-weight: 600;
}

.lang-btn:not(.active):hover { color: var(--parchment); }

/* ---------------- fi-mode (Finglish) type override ---------------- */

body.fi-mode {
  --font-display: "Cormorant Garamond", "Vazirmatn", serif;
}

body.fi-mode .hero h1 { letter-spacing: 0.5px; }
body.fi-mode .brand { letter-spacing: 0.3px; }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  text-align: center;
  padding: 56px 20px 40px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  color: var(--parchment);
  margin-bottom: 22px;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}

.hero__content { position: relative; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 68px);
  margin: 0 0 6px;
  color: var(--parchment);
  text-shadow: 0 2px 0 rgba(0,0,0,0.25);
}

.hero p.tagline {
  margin: 0 0 26px;
  color: var(--gold-bright);
  font-size: 16px;
}

.hero-search {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 999px;
  border: none;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  box-shadow: var(--shadow-card);
}

.hero-search input:focus { box-shadow: 0 0 0 3px var(--gold-bright); }

.stat-strip {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.stat-strip .stat {
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold-bright);
}

.stat span {
  font-size: 12px;
  color: rgba(243,233,210,0.75);
}

/* ---------------- search dropdown ---------------- */

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: var(--parchment);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  max-height: 340px;
  overflow-y: auto;
  z-index: 60;
  text-align: right;
  display: none;
}

.search-results.open { display: block; }

.search-results a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--parchment-deep); }
.search-results .fam { color: var(--madder); font-size: 12px; }
.search-results .empty { padding: 16px; color: #7a7263; font-size: 13px; text-align: center; }

/* ---------------- section headers ---------------- */

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 34px 0 14px;
  color: var(--indigo);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .leaf { color: var(--sage); }

/* ---------------- alphabet chips ---------------- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--parchment-dim);
  font-size: 14px;
  color: var(--indigo);
}

.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--indigo); color: var(--parchment); border-color: var(--indigo); }

/* ---------------- family grid ---------------- */

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.add-person-row {
  text-align: center;
  margin-top: 22px;
}

.family-card {
  background: var(--parchment-dim);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.family-card:hover, .family-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--gold);
}

.family-card .name {
  font-size: 17px;
  font-weight: 600;
  color: var(--indigo);
  margin-bottom: 4px;
}

.family-card .count {
  font-size: 13px;
  color: var(--madder);
}

.family-card .count b { font-family: var(--font-body); }

/* ---------------- breadcrumb ---------------- */

.breadcrumb {
  font-size: 13px;
  color: #6b6354;
  margin-bottom: 18px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--indigo); }
.breadcrumb a:hover { color: var(--gold); text-decoration: underline; }

/* ---------------- family member list ---------------- */

.member-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--parchment-dim);
}

.member-row:nth-child(even) { background: var(--parchment); }
.member-row:hover { background: var(--parchment-deep); }

.member-row .who { display: flex; align-items: center; gap: 10px; }
.member-row .gender-dot {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block;
}
.gender-dot.g1 { background: var(--indigo); }
.gender-dot.g2 { background: var(--madder); }
.gender-dot.g0 { background: #a8a08c; }

.member-row .dates { font-size: 12px; color: #7a7263; }

/* ---------------- person page ---------------- */

.person-card {
  background: linear-gradient(180deg, var(--parchment-dim), var(--parchment));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.person-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}

.person-card.g1::before { background: var(--indigo); }
.person-card.g2::before { background: var(--madder); }
.person-card.g0::before { background: #a8a08c; }

.person-card h2 {
  font-family: var(--font-display);
  font-size: 34px;
  margin: 0 0 4px;
  color: var(--indigo);
}

.person-card .family-tag {
  display: inline-block;
  font-size: 13px;
  color: var(--madder);
  background: rgba(140,58,52,0.08);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 12px;
  font-size: 14px;
}

.person-meta div b {
  display: block;
  font-size: 11px;
  color: #7a7263;
  font-weight: 500;
  margin-bottom: 2px;
}

.person-desc {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
  font-size: 14px;
  line-height: 2;
  color: #45392a;
}

/* ---------------- ego tree (signature element) ---------------- */

.tree-wrap {
  margin-top: 30px;
  position: relative;
}

.tree-scroll {
  overflow-x: auto;
  padding: 10px 4px 26px;
}

.tree {
  position: relative;
  min-width: 640px;
}

.tree-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  position: relative;
  z-index: 2;
  margin: 0 0 46px;
}

.tree-row.center-row { margin-bottom: 46px; }
.tree-row:last-child { margin-bottom: 4px; }

.tree-row-label {
  text-align: center;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 700;
}

.branch-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.node {
  background: var(--parchment);
  border: 1.5px solid var(--line-soft);
  border-radius: 11px;
  padding: 10px 14px;
  min-width: 130px;
  max-width: 170px;
  text-align: center;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(36,29,22,0.10);
  position: relative;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.node:hover, .node:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 6px 14px rgba(36,29,22,0.18);
}

.node .leaf-bullet {
  position: absolute;
  top: -9px;
  right: 50%;
  transform: translateX(50%);
  font-size: 12px;
}

.node .n-name { font-weight: 600; color: var(--indigo); }
.node .n-years { font-size: 11px; color: #7a7263; margin-top: 2px; }

.node.center {
  background: var(--indigo);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184,134,47,0.25), var(--shadow-card);
}
.node.center .n-name { color: var(--parchment); }
.node.center .n-years { color: var(--gold-bright); }

.node.ghost {
  opacity: 0.55;
  border-style: dashed;
}

.node.placeholder {
  opacity: 0.65;
  border-style: dashed;
  font-size: 12px;
  color: #7a7263;
}

.spouse-pair {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spouse-knot {
  color: var(--madder);
  font-size: 15px;
}

.more-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--sage-deep);
  border-bottom: 1px dotted var(--sage-deep);
}
.more-link:hover { color: var(--gold); border-color: var(--gold); }

.children-more {
  min-width: auto;
  padding: 8px 12px;
}

.tree-legend {
  display: flex;
  gap: 18px;
  justify-content: center;
  font-size: 12px;
  color: #6b6354;
  margin-top: 4px;
  flex-wrap: wrap;
}
.tree-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tree-legend i { width: 16px; height: 2px; display: inline-block; }
.tree-legend i.up { background: var(--indigo); }
.tree-legend i.down { background: var(--sage); }
.tree-legend i.marry { background: var(--madder); }

/* ---------------- empty / not found ---------------- */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b6354;
}
.empty-state h2 { font-family: var(--font-display); color: var(--indigo); font-size: 28px; }

/* ---------------- footer ---------------- */

.site-footer {
  text-align: center;
  font-size: 12px;
  color: #8a8272;
  padding: 30px 20px 50px;
}

.legal-footer {
  text-align: center;
  padding: 18px 20px 40px;
  border-top: 1px solid var(--line-soft);
  margin-top: -10px;
}

.legal-footer a {
  font-size: 12.5px;
  color: #8a8272;
  letter-spacing: 0.3px;
}

.legal-footer a:hover { color: var(--gold); text-decoration: underline; }

/* ---------------- impressum page ---------------- */

.impressum-card {
  background: var(--parchment-dim);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
}

.impressum-tribute {
  font-size: 15px;
  line-height: 2.1;
  color: #3a3024;
  margin: 0 0 14px;
}

.impressum-tribute--closing {
  font-style: italic;
  color: var(--indigo);
}

.impressum-tribute--solo {
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: normal;
  margin: 6px 0 2px;
}

.impressum-signature {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
  margin: 4px 0 0;
}

.impressum-divider {
  border: none;
  border-top: 1px dashed var(--line-soft);
  margin: 28px 0;
}

.impressum-legal {
  font-size: 14px;
  line-height: 1.9;
  color: #3a3024;
  text-align: left;
}

.impressum-legal a { color: var(--madder); }
.impressum-legal a:hover { text-decoration: underline; }

/* ---------------- responsive ---------------- */

@media (max-width: 640px) {
  .site-header__inner { flex-wrap: wrap; }
  .brand { font-size: 21px; }
  .header-search { order: 3; max-width: none; flex-basis: 100%; }
  .lang-switch { order: 2; margin-inline-start: auto; }
  .hero { padding: 40px 14px 30px; }
  .person-card { padding: 20px; }
  .person-card h2 { font-size: 26px; }
  .stat-strip { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   backend-powered additions: auth, editing, moderation
   ============================================================ */

/* ---------------- auth area (header) ---------------- */

.auth-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--parchment);
}

.auth-link {
  color: var(--gold-bright);
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
}
.auth-link:hover { text-decoration: underline; }

.auth-name { color: var(--parchment); font-weight: 600; }

.role-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.role-admin { background: var(--gold); color: var(--indigo-deep); }
.role-editor { background: var(--sage); color: #fff; }
.role-pending { background: rgba(243,233,210,0.2); color: var(--parchment); }

/* ---------------- auth pages (login/register) ---------------- */

.auth-card {
  max-width: 420px;
  margin: 20px auto;
  background: var(--parchment-dim);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #4a4030; }
.auth-form input {
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--parchment);
  font-family: var(--font-body);
  font-size: 14px;
}
.auth-form input:focus { border-color: var(--gold); }

.auth-switch { margin-top: 16px; font-size: 13px; text-align: center; color: #6b6354; }
.auth-switch a { color: var(--madder); }

.form-msg { font-size: 13px; color: var(--sage-deep); min-height: 18px; }
.form-msg.error { color: var(--madder); }

.btn-primary {
  background: var(--indigo);
  color: var(--parchment);
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
}
.btn-primary:hover { background: var(--indigo-deep); }

.btn-secondary {
  background: transparent;
  color: var(--indigo);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gold); }

/* ---------------- person edit ---------------- */

.person-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.edit-toggle {
  background: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  color: var(--indigo);
  cursor: pointer;
  font-family: var(--font-body);
}
.edit-toggle:hover { border-color: var(--gold); }

.deceased-tag {
  font-size: 0.6em;
  font-family: var(--font-body);
  color: #8a8272;
  font-style: italic;
}

.edit-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.edit-form label, .edit-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: #4a4030;
}

.edit-form input, .edit-form select, .edit-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--parchment);
  font-family: var(--font-body);
  font-size: 13.5px;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}
.checkbox-label input { width: auto; }

.edit-actions { display: flex; gap: 10px; }

/* ---------------- tree link affordances ---------------- */

.node.placeholder {
  cursor: default;
}
.node.placeholder[data-link-for] {
  cursor: pointer;
  opacity: 0.95;
  border-color: var(--sage-deep);
  border-width: 1.5px;
  background: rgba(91,122,84,0.06);
}
.node.placeholder[data-link-for]:hover {
  border-color: var(--gold);
  opacity: 1;
  background: rgba(184,134,47,0.10);
}
.add-hint {
  display: block;
  font-size: 10px;
  color: var(--sage-deep);
  margin-top: 3px;
}

.spouse-add {
  cursor: pointer;
  border: 1px dashed var(--sage-deep);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-deep);
  font-size: 15px;
}
.spouse-add:hover { background: var(--sage); color: #fff; border-color: var(--sage); }

.node-spouse-wrap {
  position: relative;
  display: inline-flex;
}

.remove-spouse-btn {
  position: absolute;
  top: -8px;
  inset-inline-end: -8px;
  z-index: 5;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--madder);
  background: var(--parchment);
  color: var(--madder);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.remove-spouse-btn:hover { background: var(--madder); color: #fff; }

/* ---------------- modal link picker ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--parchment);
  border-radius: var(--radius);
  padding: 24px 26px;
  max-width: 460px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.modal-card h3 {
  font-family: var(--font-display);
  color: var(--indigo);
  margin: 0 0 6px;
  font-size: 22px;
}

.modal-hint { font-size: 13px; color: #6b6354; margin: 0 0 14px; }

.second-parent-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #4a4030;
  background: var(--parchment-dim);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.second-parent-picker select {
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--parchment);
  font-family: var(--font-body);
  font-size: 13px;
}

.modal-card input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  margin-bottom: 10px;
}

.link-picker-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.link-picker-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 8px 10px;
  border: none;
  background: var(--parchment-dim);
  border-radius: 8px;
  font-size: 13.5px;
  text-align: right;
  cursor: pointer;
  font-family: var(--font-body);
  width: 100%;
}
.link-picker-item:hover { background: var(--parchment-deep); }
.link-picker-item .fam { color: var(--madder); font-size: 12px; }
.link-picker-item .lp-main { display: flex; justify-content: space-between; gap: 8px; }
.link-picker-item .lp-details { font-size: 11.5px; color: #6b6354; }

.dup-warning {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(140,58,52,0.07);
  border: 1px solid rgba(140,58,52,0.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dup-warning-title {
  font-size: 12.5px;
  color: var(--madder);
  margin-bottom: 2px;
}

/* ---------------- admin dashboard ---------------- */

.admin-subtitle {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--indigo);
  margin: 26px 0 10px;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--parchment-dim);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.admin-row-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-approve, .btn-reject {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-approve { background: var(--sage); color: #fff; }
.btn-approve:hover { background: var(--sage-deep); }
.btn-reject { background: transparent; color: var(--madder); border: 1px solid var(--madder); }
.btn-reject:hover { background: var(--madder); color: #fff; }

.admin-empty, .admin-loading { font-size: 13px; color: #8a8272; padding: 8px 2px; }

.user-status-badge {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--font-body);
}
.user-status-badge--pending { background: rgba(191,161,74,0.18); color: #8a6d1d; }
.user-status-badge--approved { background: rgba(122,150,109,0.18); color: var(--sage-deep); }
.user-status-badge--rejected { background: rgba(140,58,52,0.14); color: var(--madder); }

.danger-zone {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(140,58,52,0.35);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-danger {
  background: transparent;
  color: var(--madder);
  border: 1px solid var(--madder);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-danger:hover { background: var(--madder); color: #fff; }

@media (max-width: 640px) {
  .auth-area { order: 4; margin-inline-start: auto; }
}

/* ---------------- photos ---------------- */

.person-card-titlewrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.person-portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.leaf-bullet--photo {
  position: absolute;
  top: -14px;
  right: 50%;
  transform: translateX(50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  background: var(--parchment);
}

.photo-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.photo-upload-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.admin-photo-preview {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  margin-top: 6px;
}
