/* ==========================================================================
   AXIOS ADMIN THEME — the public site's new art direction applied to the
   administration panel. Loaded after admin.css. Only restyles.
   ========================================================================== */

.admin-body {
  background:
    radial-gradient(40% 50% at 15% 0%, rgba(227, 83, 9, 0.12), transparent 70%),
    radial-gradient(35% 45% at 90% 5%, rgba(34, 195, 214, 0.08), transparent 70%),
    var(--bg-deep);
  background-attachment: fixed;
}

/* ---------- Sidebar: liquid glass column ---------- */
.admin-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(9, 11, 16, 0.86);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.sidebar-badge {
  border-radius: 8px;
  background: rgba(255, 178, 122, 0.1);
  border-color: rgba(255, 178, 122, 0.25);
  color: var(--kicker);
}
.nav-section-title { color: var(--kicker); letter-spacing: 0.08em; }

.sidebar-item {
  border-radius: 10px;
  color: var(--text-muted);
  transition: background .3s var(--ease-brand), color .3s var(--ease-brand);
}
.sidebar-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-main); }
.sidebar-item.active {
  position: relative;
  background: rgba(255, 255, 255, 0.09);
  border-color: transparent;
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 3px;
  background: var(--primary-orange-light);
}
.sidebar-item.active .sidebar-item-icon { color: var(--primary-orange-light); stroke: var(--primary-orange-light); }
.sidebar-item-count { border-radius: 8px; }

.admin-avatar { border-radius: 12px; }

/* ---------- Topbar ---------- */
.admin-topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(7, 9, 15, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.topbar-search { border-radius: 12px; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
.topbar-search:focus-within { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(34, 195, 214, 0.18); }
.action-icon-btn,
.logout-btn-style { border-radius: 12px; }

/* ---------- Page header ---------- */
.page-title-group h1 { font-weight: 800; letter-spacing: -0.035em; }
.page-title-group p { color: var(--text-muted); }

/* ---------- KPI cards: brand accent cycle ---------- */
.kpi-grid > :nth-child(4n + 1) { --c: #FF6B1F; }
.kpi-grid > :nth-child(4n + 2) { --c: #F59E0B; }
.kpi-grid > :nth-child(4n + 3) { --c: #22C3D6; }
.kpi-grid > :nth-child(4n + 4) { --c: #FF6B1F; }

.kpi-card {
  background:
    radial-gradient(70% 70% at 100% 0%, color-mix(in srgb, var(--c, #FF6B1F) 14%, transparent), transparent 70%),
    var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  transition: border-color .4s var(--ease-brand), transform .4s var(--ease-brand);
}
.kpi-card:hover { border-color: color-mix(in srgb, var(--c, #FF6B1F) 45%, transparent); transform: translateY(-2px); }
.kpi-value { font-weight: 800; letter-spacing: -0.03em; }
.kpi-icon-wrap {
  border-radius: 13px;
  color: var(--c, #FF6B1F);
  background: color-mix(in srgb, var(--c, #FF6B1F) 14%, transparent);
  border-color: color-mix(in srgb, var(--c, #FF6B1F) 35%, transparent);
}
.kpi-icon-wrap svg { stroke: var(--c, #FF6B1F); }

/* ---------- Panels & tables ---------- */
.data-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 18px;
}
.data-panel-header { border-bottom-color: rgba(255, 255, 255, 0.06); }
.data-panel-title { font-weight: 700; letter-spacing: -0.01em; }
.admin-table th { color: var(--text-dim); letter-spacing: 0.06em; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.btn-table-action { border-radius: 10px; }
.status-badge { border-radius: 8px; }

/* ---------- Buttons ---------- */
.admin-body .glass-btn { border-radius: 12px; }
.admin-body .glass-btn-primary {
  background: var(--cta);
  color: var(--cta-ink);
  border: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 26px -10px rgba(255, 107, 31, 0.55);
}
.admin-body .glass-btn-primary:hover {
  background: var(--cta);
  color: var(--cta-ink);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px #fff, 0 14px 32px -10px rgba(255, 107, 31, 0.75);
}
.admin-body .glass-btn-primary svg { stroke: var(--primary-orange); }
.admin-body .glass-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
}

/* ---------- Inputs ---------- */
.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select,
.admin-body textarea,
.filter-select { border-radius: 12px; }
.admin-body input:not([type="checkbox"]):not([type="radio"]):focus,
.admin-body select:focus,
.admin-body textarea:focus {
  border-color: var(--aqua) !important;
  box-shadow: 0 0 0 3px rgba(34, 195, 214, 0.18);
  outline: none;
}

/* ---------- Modals ---------- */
.admin-modal-overlay { background: rgba(5, 6, 10, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.admin-modal-box,
.admin-modal-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 50%, rgba(255, 255, 255, 0.04)),
    rgba(10, 12, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 40px 100px -30px rgba(0, 0, 0, 0.95);
}
.admin-modal-section-title { color: var(--kicker); }
.admin-modal-close { border-radius: 10px; }

/* ---------- Sign-in screen ---------- */
.admin-auth-overlay {
  background:
    radial-gradient(40% 50% at 25% 20%, rgba(227, 83, 9, 0.22), transparent 70%),
    radial-gradient(35% 45% at 80% 80%, rgba(34, 195, 214, 0.16), transparent 70%),
    var(--bg-deep);
}
.admin-auth-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0.02) 65%, rgba(255, 255, 255, 0.06) 100%),
    rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 40px 100px -30px rgba(0, 0, 0, 0.9);
}
.auth-title { font-weight: 800; letter-spacing: -0.03em; }
.auth-input { border-radius: 12px; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.auth-btn-submit {
  border-radius: 12px;
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 30px -10px rgba(255, 107, 31, 0.6);
}
.auth-btn-submit:hover { background: var(--cta); filter: none; transform: translateY(-1px); }
.auth-btn-submit svg { stroke: var(--primary-orange); }

@media (prefers-reduced-motion: reduce) {
  .kpi-card, .sidebar-item { transition: none; }
  .kpi-card:hover { transform: none; }
}

/* ==========================================================================
   SEARCH FIELDS & DROPDOWNS — one modern style for every module
   ========================================================================== */
.admin-body { color-scheme: dark; }

/* ---------- Search fields ---------- */
.admin-body input.filter-select,
#donationSearch {
  box-sizing: border-box;
  height: 42px;
  padding: 0 14px 0 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA3B5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 14px 50% / 16px no-repeat,
    rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color .3s var(--ease-brand), background-color .3s var(--ease-brand), box-shadow .3s var(--ease-brand);
}
.admin-body input.filter-select::placeholder,
#donationSearch::placeholder { color: var(--text-dim); }
.admin-body input.filter-select:hover,
#donationSearch:hover { border-color: rgba(255, 255, 255, 0.2); }
.admin-body input.filter-select:focus,
#donationSearch:focus {
  border-color: var(--aqua) !important;
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(34, 195, 214, 0.18);
}

.topbar-search {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.topbar-search:focus-within { background: rgba(255, 255, 255, 0.06); }
.topbar-search svg { stroke: var(--text-muted); }

/* ---------- Custom dropdown (js/admin-ui.js) ---------- */
.ax-select {
  position: relative;
  display: inline-block;
  min-width: 170px;
  vertical-align: middle;
}
.ax-select-form { display: block; width: 100%; }
.ax-select-native {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ax-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 12px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #F1F3F7;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color .3s var(--ease-brand), background-color .3s var(--ease-brand), box-shadow .3s var(--ease-brand);
}
.ax-select-form .ax-select-button { height: 46px; }
.ax-select-button:hover { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); }
.ax-select-button:focus-visible,
.ax-select.is-open .ax-select-button {
  outline: none;
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(34, 195, 214, 0.18);
}
.ax-select-button:disabled { opacity: .5; cursor: not-allowed; }
.ax-select-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-select-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s var(--ease-brand), stroke .3s var(--ease-brand);
}
.ax-select.is-open .ax-select-chevron { transform: rotate(180deg); stroke: var(--aqua); }

.ax-select-list {
  position: fixed;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 5px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 50%, rgba(255, 255, 255, 0.04)),
    rgba(12, 15, 22, 0.97);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 24px 60px -18px rgba(0, 0, 0, 0.9);
  font-family: var(--font-main);
  animation: ax-drop-in .22s var(--ease-brand) both;
  transform-origin: top center;
}
.ax-select-list.is-up { transform-origin: bottom center; }
.ax-select-options { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.ax-select-options::-webkit-scrollbar { width: 6px; }
.ax-select-options::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 6px; }

.ax-select-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 30px 6px 10px;
  border-radius: 8px;
  font-size: 0.84375rem;
  line-height: 1.25;
  color: #D5DAE3;
  cursor: pointer;
  white-space: nowrap;
}
.ax-select-option.is-active { background: rgba(255, 255, 255, 0.07); color: #fff; }
.ax-select-option[aria-selected="true"] { color: #fff; font-weight: 600; }
.ax-select-option[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 10px;
  width: 13px;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6B1F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ax-select-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

@keyframes ax-drop-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Donations: filter bar ---------- */
.donation-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.donation-filters > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kicker);
}
.donation-filters > label > input,
.donation-filters .ax-select { width: 100%; min-width: 0; text-transform: none; letter-spacing: normal; }
.donation-filters .ax-select-button { text-transform: none; letter-spacing: normal; }
#donationAdminMessage {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
#donationAdminMessage:empty { display: none; }

@media (max-width: 1100px) {
  .donation-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .donation-filters > label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .donation-filters { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ax-select-list { animation: none; }
  .ax-select-chevron, .ax-select-button { transition: none; }
}

.ax-select.is-invalid .ax-select-button { border-color: #F87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2); }

.ax-select-option[hidden] { display: none; }
.ax-select-search {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 5px;
}
.ax-select-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.ax-select-search input {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 0 10px 0 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.84375rem;
  outline: none;
}
.ax-select-search input::placeholder { color: var(--text-dim); }
.ax-select-search input:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(34, 195, 214, 0.16); }
.ax-select-empty { margin: 0; padding: 10px; font-size: 0.8125rem; color: var(--text-muted); text-align: center; }

.ax-select-list, .ax-select-list *, .ax-select, .ax-select-button { box-sizing: border-box; }

/* Form fields without a leading icon do not need the icon gutter */
.auth-input-wrapper:not(:has(.auth-input-icon)) .auth-input { padding-left: 14px; }

/* ==========================================================================
   PASTOR FAMILIES — photo upload, table avatar, profile credential
   ========================================================================== */

/* ---------- Photo slots in the form ---------- */
.pf-photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: start;
  gap: 16px;
  margin-bottom: 22px;
}
.pf-photo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pf-photo-drop {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(70% 70% at 50% 100%, rgba(227, 83, 9, 0.12), transparent 70%),
    rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .3s var(--ease-brand), background-color .3s var(--ease-brand);
}
.pf-photo-family .pf-photo-drop { height: 170px; }
.pf-photo-pastor .pf-photo-drop { width: 170px; height: 170px; border-radius: 50%; }
.pf-photo-drop:hover,
.pf-photo-drop.is-drag { border-color: var(--aqua); background-color: rgba(34, 195, 214, 0.06); }
.pf-photo-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-photo-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; text-align: center; }
.pf-photo-empty svg { width: 30px; height: 30px; margin-bottom: 4px; fill: none; stroke: var(--primary-orange-light); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pf-photo-empty strong { font-size: 0.875rem; color: var(--text-main); }
.pf-photo-empty small { font-size: 0.75rem; color: var(--text-muted); }
.pf-photo.has-photo .pf-photo-empty { display: none; }
.pf-photo.has-photo .pf-photo-drop { border-style: solid; border-color: rgba(255, 255, 255, 0.14); }
.pf-photo.is-loading .pf-photo-drop { opacity: .6; pointer-events: none; }
.pf-photo-actions { display: none; gap: 6px; justify-content: center; }
.pf-photo.has-photo .pf-photo-actions { display: flex; }

/* ---------- Table avatar ---------- */
.pf-table-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 107, 31, 0.5);
}
.pf-table-avatar-empty {
  display: grid;
  place-items: center;
  background: rgba(255, 107, 31, 0.14);
  color: var(--primary-orange-light);
  font-size: 0.875rem;
  font-weight: 700;
}
.btn-table-action svg { vertical-align: -2px; margin-right: 2px; }

/* ---------- Profile credential ---------- */
.pf-profile-overlay { padding: 20px; }
.pf-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 26px;
  border: 1px solid transparent;
  background:
    linear-gradient(#0C0F16, #0C0F16) padding-box,
    linear-gradient(150deg, rgba(255, 107, 31, 0.9), rgba(255, 255, 255, 0.14) 45%, rgba(34, 195, 214, 0.85)) border-box;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95), 0 0 80px -30px rgba(255, 107, 31, 0.45);
  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform .45s var(--ease-brand), opacity .35s var(--ease-brand);
}
.pf-profile-overlay.active .pf-card { transform: none; opacity: 1; }

.pf-cover { position: relative; aspect-ratio: 16 / 7; overflow: hidden; border-radius: 25px 25px 0 0; background: #11141C; }
.pf-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 15, 22, 0.55) 0%, rgba(12, 15, 22, 0) 35%, rgba(12, 15, 22, 0) 55%, #0C0F16 100%);
  pointer-events: none;
}
.pf-cover-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  height: 100%;
  background:
    radial-gradient(40% 70% at 25% 60%, rgba(227, 83, 9, 0.35), transparent 70%),
    radial-gradient(40% 70% at 80% 40%, rgba(34, 195, 214, 0.25), transparent 70%);
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.pf-cover-placeholder svg { width: 40px; height: 40px; fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.pf-cover-top {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 16px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pf-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 10px;
  background: rgba(10, 12, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.pf-brand img { width: 18px; height: 16px; object-fit: contain; }
.pf-close {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 18, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.pf-close:hover { background: rgba(255, 255, 255, 0.12); }
.pf-status {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  padding: 5px 12px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.95);
  color: #0B0D12;
  font-size: 0.75rem;
  font-weight: 700;
}

.pf-identity {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-top: -58px;
  padding: 0 26px;
}
.pf-avatar {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(150deg, #FF6B1F, #F59E0B 50%, #22C3D6);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.9);
}
.pf-avatar img,
.pf-avatar > span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #0C0F16;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #161A24;
  color: var(--primary-orange-light);
  font-size: 2.25rem;
  font-weight: 800;
}
.pf-avatar-check {
  position: absolute;
  right: 4px;
  bottom: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #0C0F16;
  background: #10B981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.pf-identity-text { padding-bottom: 4px; min-width: 0; }
.pf-identity-text h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: #fff; }
.pf-spouse { margin: 2px 0 0; font-size: 0.9375rem; color: #C3CAD6; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pf-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  color: #E2E6EE;
}
.pf-tag img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.pf-tag.is-verified { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); color: #34D399; }
.pf-monthly {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  text-align: right;
}
.pf-monthly span { display: block; font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.pf-monthly strong { font-size: 1.375rem; font-weight: 800; color: #34D399; letter-spacing: -0.02em; }
.pf-monthly small { font-size: 0.75rem; font-weight: 600; color: #6EE7B7; }

.pf-body { padding: 22px 26px 6px; }
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 0;
}
.pf-field span { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kicker); }
.pf-field strong { font-size: 0.875rem; font-weight: 600; color: #F1F3F7; overflow-wrap: anywhere; }
.pf-field a { color: #F1F3F7; text-decoration: none; }
.pf-field a:hover { color: var(--aqua); }
.pf-story {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border-left: 3px solid var(--primary-orange);
  background: rgba(255, 255, 255, 0.03);
}
.pf-story span { display: block; margin-bottom: 6px; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kicker); }
.pf-story p { margin: 0; font-size: 0.875rem; line-height: 1.65; color: #D5DAE3; white-space: pre-line; }

.pf-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 26px 22px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.75rem; color: var(--text-dim); }
.pf-meta span:first-child { font-family: var(--font-mono, monospace); color: var(--text-muted); letter-spacing: 0.04em; }
.pf-footer-actions { display: flex; gap: 8px; }
.pf-footer-actions .glass-btn { padding: 9px 18px; font-size: 0.8125rem; }

@media (max-width: 720px) {
  .pf-photos { grid-template-columns: 1fr; }
  .pf-photo-pastor { max-width: 180px; margin: 0 auto; }
  .pf-identity { grid-template-columns: auto minmax(0, 1fr); padding: 0 18px; }
  .pf-monthly { grid-column: 1 / -1; text-align: left; }
  .pf-avatar { width: 92px; height: 92px; }
  .pf-grid { grid-template-columns: 1fr 1fr; }
  .pf-body, .pf-footer { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-card { transition: none; }
}

/* ---------- Children: yes/no switch + names list ---------- */
.pf-yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  height: 46px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.pf-yesno-btn {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s var(--ease-brand), color .3s var(--ease-brand), box-shadow .3s var(--ease-brand);
}
.pf-yesno-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.pf-yesno-btn.is-active { background: #fff; color: #0B0D12; box-shadow: 0 6px 16px -8px rgba(255, 107, 31, 0.7); }
.pf-yesno-btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

.pf-children {
  margin-top: 4px;
  margin-bottom: 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(60% 80% at 0% 0%, rgba(255, 107, 31, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.02);
  animation: ax-drop-in .25s var(--ease-brand) both;
}
.pf-children[hidden] { display: none; }
.pf-children-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pf-children-head .auth-label { margin: 0; }
.pf-children-count {
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(255, 107, 31, 0.14);
  color: var(--primary-orange-light);
  font-size: 0.75rem;
  font-weight: 700;
}
.pf-children-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pf-child-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  animation: ax-drop-in .22s var(--ease-brand) both;
}
.pf-child-n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--kicker);
  font-size: 0.75rem;
  font-weight: 700;
}
.pf-child-row .auth-input { height: 40px; padding: 0 12px !important; }
.pf-child-remove {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}
.pf-child-remove:hover { color: #F87171; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.pf-children-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 38px;
  padding: 0 14px 0 6px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .3s var(--ease-brand), background .3s var(--ease-brand);
}
.pf-children-add span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-orange);
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
}
.pf-children-add:hover { border-color: var(--aqua); background: rgba(34, 195, 214, 0.06); }

/* Credential: children names take the full row */
.pf-field-wide { grid-column: 1 / -1; }
.pf-children-names { font-weight: 500; color: #D5DAE3; }

@media (max-width: 720px) {
  .pf-children-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-children, .pf-child-row { animation: none; }
}

/* ==========================================================================
   MODULES — Formación Teológica, Cuidado Integral, Eventos (js/admin-modules.js)
   ========================================================================== */
.mod-panel-header { flex-wrap: wrap; gap: 12px; }
.mod-panel-title { display: flex; align-items: center; gap: 10px; }
.mod-tag { font-size: 0.6875rem; }
.mod-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-filters input.filter-select { min-width: 220px; }

.mod-cell { display: flex; flex-direction: column; gap: 2px; font-size: 0.8125rem; color: #D5DAE3; }
.mod-strong { color: #fff; font-size: 0.875rem; font-weight: 600; }
.mod-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-dim); }
.mod-warn { color: #F87171; font-weight: 600; }
.mod-flag { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; vertical-align: -1px; margin-right: 6px; }
.mod-sub .mod-flag { margin-right: 0; }
.mod-bar { display: block; width: 90px; height: 4px; margin-top: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mod-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FF6B1F, #F59E0B); }

.mod-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.mod-danger { color: #F87171 !important; }
.mod-danger svg { margin: 0; }

.mod-empty { padding: 40px 20px !important; text-align: center; color: var(--text-muted); }
.mod-empty strong { display: block; margin-bottom: 12px; color: var(--text-main); font-size: 0.9375rem; }
.mod-empty .glass-btn { font-size: 0.8125rem; padding: 8px 18px; }

.mod-section { margin-top: 18px; }
.mod-section:first-child { margin-top: 0; }
.mod-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}
.mod-field { min-width: 0; }

.mod-detail-card { max-width: 760px; }
.mod-detail-kicker { display: block; margin-bottom: 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kicker); }

@media (max-width: 860px) {
  .mod-form-grid { grid-template-columns: 1fr 1fr; }
  .mod-field[style*="span 3"] { grid-column: 1 / -1 !important; }
}
@media (max-width: 560px) {
  .mod-form-grid { grid-template-columns: 1fr; }
  .mod-field { grid-column: 1 / -1 !important; }
  .mod-filters input.filter-select { min-width: 0; width: 100%; }
}
