/* PawsForward layout — spacious, centered, modern on top of shared dashboard CSS. */

:root {
  --pf-page-max: 1120px;
  --pf-section-gap: 28px;
  --pf-card-pad: 28px;
  --pf-soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

@media (min-width: 901px) {
  :root {
    --pf-page-max: 1320px;
    --pf-section-gap: 32px;
    --pf-card-pad: 32px;
  }
}

/* ---- Page shell / centering ---- */
body[data-page="admin"] #page-body.dashboard-redesign.owner-console-page,
.main > #page-body.dashboard-redesign.owner-console-page {
  width: 100%;
  max-width: var(--pf-page-max);
  margin-inline: auto;
  box-sizing: border-box;
}

body[data-page="donate"] #page-body,
body[data-page="login"] #page-body,
.main > #page-body[data-page-slot="narrow"],
body[data-page="donate"] .main > #page-body,
body[data-page="login"] .main > #page-body {
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
  box-sizing: border-box;
}

body[data-page="privacy"] #page-body,
body[data-page="terms"] #page-body,
body[data-page="privacy"] .main > #page-body,
body[data-page="terms"] .main > #page-body,
.main > #page-body.legal-page {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  box-sizing: border-box;
}

.main {
  padding: 56px 56px 140px !important;
  align-items: center !important;
}

.main > #page-body {
  padding-inline: 8px;
}

body[data-page="admin"] .main > #page-body,
body[data-page="donate"] .main > #page-body,
body[data-page="privacy"] .main > #page-body,
body[data-page="terms"] .main > #page-body,
body[data-page="login"] .main > #page-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--pf-section-gap);
  padding-top: 12px;
}

@media (max-width: 900px) {
  .main {
    padding: 28px 18px 96px !important;
  }

  :root {
    --pf-section-gap: 20px;
    --pf-card-pad: 20px;
  }
}

/* ---- Sidebar ---- */
.sidebar-foot {
  margin-top: auto;
  padding: 20px 10px 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.sidebar-panel {
  padding: 28px 18px 32px !important;
}

.sidebar-panel .nav-list-standalone {
  padding: 10px !important;
  gap: 4px;
}

.sidebar-panel .nav-link {
  padding: 12px 14px !important;
  border-radius: 12px !important;
  gap: 12px !important;
}

.sidebar-panel .brand {
  margin-bottom: 28px !important;
  padding: 4px 6px 8px !important;
}

body[data-page="donate"] .brand-mark,
body[data-page="admin"] .brand-mark,
body[data-page="privacy"] .brand-mark,
body[data-page="terms"] .brand-mark,
body[data-page="login"] .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0;
}

.brand-mark--logo,
.brand-mark:has(.brand-mark-img) {
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.brand-mark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: inherit;
}

body[data-page="login"] .site-lock-logo {
  object-fit: cover;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  padding: 0;
  box-sizing: border-box;
}

/* Compact menu button (public pages that still use shell) */
.menu-btn {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  gap: 6px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

.menu-btn .ico-menu {
  width: 14px !important;
  height: 14px !important;
}

.menu-btn span {
  font-size: 12px !important;
  font-weight: 650 !important;
}

/* Admin: no sidebar / full-bleed content */
body.pf-no-sidebar .sidebar,
body.pf-no-sidebar .sidebar-overlay,
body.pf-no-sidebar .menu-btn,
body[data-page="admin"] .sidebar,
body[data-page="admin"] .sidebar-overlay,
body[data-page="admin"] .menu-btn {
  display: none !important;
}

body.pf-no-sidebar .main,
body[data-page="admin"] .main {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 18px 18px 64px !important;
}

/* Fit the whole admin UI in one viewport — no page scroll.
   Critical: #shell must participate in the height chain. Without that,
   height:100% on .main collapses and the dashboard paints blank white. */
html:has(body[data-page="admin"]),
body[data-page="admin"] {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body[data-page="admin"] {
  display: flex;
  flex-direction: column;
}

body[data-page="admin"] #shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Keep modal sheets above the locked admin shell */
body[data-page="admin"] dialog.pf-dialog {
  z-index: 80;
}

body[data-page="admin"] .main {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 12px 12px 0 !important;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

body[data-page="admin"] #page-body.pf-admin-minimal {
  max-width: 860px;
  width: 100%;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  margin-inline: auto;
  gap: 10px;
  padding-inline: 4px;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-page="admin"] .pf-admin-stack {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-page="admin"] .pf-admin-page.is-active:not([hidden]),
body[data-page="admin"] .pf-admin-page.is-enter:not([hidden]),
body[data-page="admin"] .pf-admin-page.is-exit:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  opacity: 1;
}

body[data-page="admin"] .pf-admin-page.is-active:not([hidden]) > .pf-section-head,
body[data-page="admin"] .pf-admin-page.is-enter:not([hidden]) > .pf-section-head,
body[data-page="admin"] .pf-admin-page.is-active:not([hidden]) > .pf-stat-strip,
body[data-page="admin"] .pf-admin-page.is-enter:not([hidden]) > .pf-stat-strip {
  flex: 0 0 auto;
}

body[data-page="admin"] .pf-activity-locations {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  margin-top: 8px;
}

body[data-page="admin"] .pf-geo-chart {
  flex: 0 0 auto;
  max-width: 260px;
  max-height: 64px;
  min-height: 0;
  width: 100%;
  padding: 2px 0 0;
}

body[data-page="admin"] .pf-geo-svg {
  width: 100%;
  height: auto;
  max-width: 260px;
  max-height: 64px;
  display: block;
}

/* Volunteers + Donations: fill remaining stack height, scroll inside the list */
body[data-page="admin"] #employees.is-active:not([hidden]),
body[data-page="admin"] #donations.is-active:not([hidden]),
body[data-page="admin"] #employees.is-enter:not([hidden]),
body[data-page="admin"] #donations.is-enter:not([hidden]) {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 16px 16px 10px;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 1;
}

body[data-page="admin"] #employees .pf-section-head,
body[data-page="admin"] #donations .pf-section-head {
  margin-bottom: 10px;
  flex: 0 0 auto;
}

body[data-page="admin"] #employees .dash-empty,
body[data-page="admin"] #donations .dash-empty {
  flex: 0 0 auto;
}

body[data-page="admin"] #employees .pf-employee-list,
body[data-page="admin"] #donations .pf-donation-list,
body[data-page="admin"] #employees-body,
body[data-page="admin"] #donations-feed {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: auto;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  align-content: start;
  grid-auto-rows: max-content;
  padding: 2px 2px 6px;
}

.pf-admin-page {
  display: none;
}

.pf-admin-page.is-active:not([hidden]),
.pf-admin-page.is-enter:not([hidden]) {
  display: block;
}

.pf-admin-page.is-enter:not([hidden]) {
  animation: pf-page-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pf-admin-page.is-active:not([hidden]):not(.is-exit) {
  opacity: 1;
  transform: none;
}

.pf-admin-page.is-exit:not([hidden]) {
  display: block;
  animation: pf-page-out 0.18s ease forwards;
  pointer-events: none;
}

.pf-admin-page[hidden] {
  display: none !important;
  animation: none !important;
}

@keyframes pf-page-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pf-page-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
}

.pf-dock {
  position: fixed;
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  width: auto;
  max-width: 560px;
  margin-inline: auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.pf-dock-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.pf-dock .pf-admin-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.pf-dock-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.pf-dock-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  min-height: 36px;
  min-width: 0;
  padding: 0 6px;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.16s ease,
    box-shadow 0.2s ease;
}

.pf-dock-tab-short {
  display: none;
}

.pf-dock-tab:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.pf-dock-tab:active {
  transform: scale(0.96);
}

.pf-dock-tab.is-active {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.pf-dock-tab.is-active:hover {
  color: #fff;
  background: #0f172a;
}

.pf-dock-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pf-dock-tool {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.14s ease,
    box-shadow 0.18s ease;
}

.pf-dock-tool--icon {
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pf-dock-tool--icon .ico {
  width: 16px;
  height: 16px;
  transition: transform 0.35s ease;
}

.pf-dock-tool:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.pf-dock-tool:active {
  transform: scale(0.94);
}

.pf-dock-tool:active .ico {
  transform: rotate(-180deg);
}

.pf-btn-danger {
  color: #b91c1c !important;
}

.pf-confirm-danger {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #fff !important;
}

.pf-confirm-danger:hover {
  background: #991b1b !important;
  border-color: #991b1b !important;
  color: #fff !important;
}

.pf-employee-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  max-width: none;
}

/* ---- Hero ---- */
.dashboard-redesign.owner-console-page .pf-page-hero,
.pf-page-hero {
  margin: 0 0 8px;
  text-align: center;
}

.pf-page-hero-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.pf-page-hero-row > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.pf-page-hero-row .page-label {
  display: inline-flex;
  margin: 0 auto 10px;
}

.pf-page-hero-row h1,
.pf-page-hero h1,
.legal-page > h1 {
  margin: 0;
  text-align: center;
  letter-spacing: -0.045em;
}

.pf-page-hero-row .lead,
.pf-page-hero .lead,
.legal-page > .lead {
  margin: 10px auto 0;
  max-width: 40rem;
  text-align: center;
  line-height: 1.55;
}

.pf-page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---- Cards / sections ---- */
body[data-page="admin"] .dash-work-panels-card,
body[data-page="admin"] .dash-goal-tracker-card,
body[data-page="donate"] .dash-work-panels-card,
body[data-page="login"] .dash-work-panels-card {
  padding: var(--pf-card-pad) !important;
  border-radius: 18px !important;
  box-shadow: var(--pf-soft-shadow) !important;
}

body[data-page="admin"] .owner-console-team-overview,
body[data-page="admin"] .owner-console-inbox,
body[data-page="admin"] .owner-console-team,
body[data-page="admin"] #employees,
body[data-page="admin"] #geography,
body[data-page="admin"] #visits {
  margin: 0;
}

body[data-page="admin"] .owner-console-layout {
  gap: 24px !important;
  padding-top: 0 !important;
}

body[data-page="admin"] .owner-console-team-totals {
  gap: 12px !important;
  margin: 0 0 20px !important;
}

body[data-page="admin"] .owner-console-team-total {
  padding: 16px 16px !important;
  border-radius: 14px !important;
}

body[data-page="admin"] .owner-console-team-table thead th,
body[data-page="admin"] .owner-console-team-table tbody td,
body[data-page="admin"] .owner-console-team-table tbody th {
  padding: 12px 14px !important;
}

body[data-page="admin"] .owner-console-inbox-search-wrap,
body[data-page="admin"] .owner-console-export-bar {
  margin-bottom: 14px;
}

body[data-page="admin"] .owner-console-inbox-search {
  min-height: 46px;
  padding: 12px 14px;
}

body[data-page="admin"] .dash-sales-history-head,
body[data-page="admin"] .owner-console-inbox-head,
body[data-page="admin"] .owner-console-team-head,
body[data-page="admin"] .owner-console-team-overview-head {
  margin-bottom: 16px !important;
  gap: 14px !important;
}

.status-banner {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.status-banner.is-ok {
  color: var(--green);
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 28%, var(--border));
}

.status-banner.is-err {
  color: var(--red, #dc2626);
  background: var(--red-soft, #fef2f2);
  border-color: color-mix(in srgb, var(--red, #dc2626) 28%, var(--border));
}

.pf-stack {
  display: flex;
  flex-direction: column;
  gap: var(--pf-section-gap);
}

.pf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

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

.pf-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pf-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.list-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-feed li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 12px;
  background: var(--surface);
}

.feed-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.feed-amount {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  white-space: nowrap;
}

.geo-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}

.geo-bar-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.geo-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #18e07f), #18e07f);
}

.geo-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-sm {
  padding: 8px 12px !important;
  font-size: 12px !important;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Shared dialog chrome — positioning is viewport-specific below.
   Never center with inset/margin on mobile: that flashes the sheet at the top
   during open on iOS home-screen (standalone) PWAs. */
body[data-page="admin"] dialog.pf-dialog.site-leave-dialog,
body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide {
  position: fixed !important;
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: none !important;
}

@media (min-width: 901px) {
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog,
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide {
    inset: 0 !important;
    width: min(440px, calc(100vw - 48px)) !important;
    max-width: min(440px, calc(100vw - 48px)) !important;
    height: fit-content !important;
    max-height: none !important;
    margin: auto !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    overflow: visible !important;
  }

  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide {
    width: min(480px, calc(100vw - 48px)) !important;
    max-width: min(480px, calc(100vw - 48px)) !important;
  }
}

@media (max-width: 900px) {
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog,
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide {
    inset: auto !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
}

/* Desktop: keep the whole dialog on screen without internal scrolling */
@media (min-width: 901px) {
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog,
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide {
    width: min(460px, calc(100vw - 64px)) !important;
    max-width: min(460px, calc(100vw - 64px)) !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide {
    width: min(520px, calc(100vw - 64px)) !important;
    max-width: min(520px, calc(100vw - 64px)) !important;
  }

  body[data-page="admin"] dialog.pf-dialog .site-leave-dialog-panel {
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="admin"] #employee-dialog .site-leave-dialog-panel {
    padding: 20px 22px 18px !important;
  }

  body[data-page="admin"] #employee-dialog .site-leave-dialog-text {
    margin-bottom: 12px !important;
  }

  body[data-page="admin"] #employee-dialog .pf-emp-identity-block {
    margin-bottom: 10px;
  }

  body[data-page="admin"] #employee-dialog .pf-avatar-preview {
    width: 64px;
    height: 64px;
  }

  body[data-page="admin"] #employee-dialog .field {
    margin-bottom: 10px;
  }

  body[data-page="admin"] #employee-dialog .site-leave-dialog-actions {
    margin-top: 8px;
    position: static;
    padding: 0;
    background: none;
  }
}

.pf-dialog .site-leave-dialog-panel {
  width: 100%;
  margin: 0 auto;
  padding: 18px 18px 16px !important;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
  border-radius: 14px !important;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.pf-dialog .site-leave-dialog-title {
  font-size: 1.12rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  margin: 0 0 4px !important;
  color: var(--text, #0f172a);
}

.pf-dialog .site-leave-dialog-text {
  margin: 0 0 14px !important;
  font-size: 0.9rem !important;
  line-height: 1.45;
  color: var(--muted, #64748b);
}

.pf-dialog .site-leave-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 4px;
}

.pf-dialog .site-leave-dialog-actions .btn {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 600;
}

.pf-dialog .field {
  margin-bottom: 12px;
}

.pf-dialog .pf-emp-identity-block {
  margin: 0 0 14px;
}

.pf-dialog .pf-avatar-editor {
  margin: 0 auto 12px;
}

.pf-dialog .pf-avatar-preview {
  width: 76px;
  height: 76px;
}

.pf-dialog .pf-emp-detail-stats {
  max-width: 100%;
  gap: 6px;
  margin-bottom: 12px;
}

.pf-dialog .pf-emp-stat {
  padding: 8px 6px;
}

.pf-dialog .pf-emp-detail-actions {
  margin-bottom: 10px;
}

.pf-dialog .field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted, #64748b);
}

.pf-dialog .field input,
.pf-dialog .field select,
.pf-donate-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px !important; /* prevents iOS focus zoom */
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--input-bg, var(--surface, #fff));
  color: var(--text, #0f172a);
}

.pf-dialog .field input:focus,
.pf-dialog .field select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent, #0f172a) 55%, var(--border, #e2e8f0));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft, #cbd5e1) 55%, transparent);
}

.pf-dialog .field input:-webkit-autofill,
.pf-dialog .field input:-webkit-autofill:hover,
.pf-dialog .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text, #0f172a);
  box-shadow: 0 0 0 1000px var(--input-bg, #fff) inset;
  transition: background-color 9999s ease-out;
}

/* Modern select inside admin dialogs */
.pf-dialog .ui-select {
  width: 100%;
}

.pf-dialog .ui-select-trigger {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
}

.pf-dialog .ui-select-menu {
  z-index: 80;
  max-height: min(240px, 42dvh);
  border-radius: 12px;
}

.pf-payout-summary {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
}

.pf-payout-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.pf-payout-summary span {
  color: var(--muted, #64748b);
}

.pf-payout-summary strong {
  font-variant-numeric: tabular-nums;
  color: var(--text, #0f172a);
}

.pf-optional {
  font-weight: 500;
  color: var(--muted, #64748b);
}

.pf-required {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 12px 0 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.qr-box canvas {
  display: block;
  border-radius: 10px;
  background: #fff;
}

.qr-link {
  margin: 0;
  max-width: 100%;
  word-break: break-all;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.pf-overview-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft, #eef2ff) 55%, var(--surface));
}

.pf-linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.pf-linkish:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.pf-donation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 10px;
}

.pf-donation-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-employee-meta {
  margin: 0;
}

.pf-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.pf-meta-grid dt {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pf-meta-grid dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  word-break: break-word;
}

.pf-meta-link {
  font-family: var(--mono);
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  color: var(--muted);
}

.pf-employee-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 0;
}

.pf-mini-donation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--surface);
}

code {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Donate / login cards ---- */
body[data-page="donate"] #page-body,
body[data-page="login"] #page-body {
  min-height: min(70vh, 760px);
  justify-content: center;
}

body[data-page="donate"] .donate-card,
body[data-page="login"] .donate-card {
  width: 100%;
  padding: 36px 32px !important;
}

body[data-page="donate"] .field,
body[data-page="login"] .field {
  margin-bottom: 18px;
}

body[data-page="donate"] .field label,
body[data-page="login"] .field label {
  display: block;
  margin-bottom: 8px;
}

body[data-page="donate"] .field input,
body[data-page="login"] .field input {
  min-height: 48px;
  padding: 12px 14px;
}

.donate-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
  text-align: left;
}

.donate-brand h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.donate-hero-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
}

.pf-fact,
.pf-byline {
  text-align: center;
  line-height: 1.55;
}

.pf-fact {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pf-byline {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.amount-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
}

body[data-page="donate"] .amount-pills .pill {
  padding: 10px 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

body[data-page="donate"] .amount-pills .pill.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}

.money-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--input-bg, var(--surface, #fff));
}

.money-wrap:focus-within {
  border-color: color-mix(in srgb, var(--accent, #0f172a) 55%, var(--border, #e2e8f0));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft, #cbd5e1) 55%, transparent);
}

.money-wrap .money-symbol {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
}

.money-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  min-height: 48px;
  margin: 0;
  padding: 12px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Modern currency field (payout amount, etc.) — no native spin buttons */
.pf-money-input {
  min-height: 52px;
}

.pf-dialog .pf-money-input input[type="number"] {
  width: auto;
  min-height: 52px;
  padding: 14px 0 !important;
  font-size: 1.35rem !important;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  appearance: textfield;
  -moz-appearance: textfield;
}

.pf-dialog .pf-money-input input[type="number"]::-webkit-outer-spin-button,
.pf-dialog .pf-money-input input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pf-dialog .pf-money-input .money-symbol {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted, #64748b);
}

.pf-dialog .pf-money-input input::placeholder {
  color: color-mix(in srgb, var(--muted, #94a3b8) 70%, transparent);
  font-weight: 500;
}

.success-panel {
  text-align: center;
  padding: 12px 0;
}

.success-panel h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.field-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

/* ---- PIN unlock (Moonrise-style minimal gate) ---- */
body[data-page="login"] {
  margin: 0;
  min-height: 100vh;
  background: #ffffff !important;
  color: #111827 !important;
  color-scheme: light;
}

body[data-page="login"] #site-lock {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 0;
  background: #ffffff !important;
  color: #111827 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

html.site-lock-active body[data-page="login"] #site-lock,
body[data-page="login"]:not(.site-unlocked) #site-lock {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body[data-page="login"] .site-lock-error.is-loading {
  color: #64748b;
  background: transparent;
  border: 0;
  min-height: 1.4rem;
  display: grid;
  place-items: center;
}

.pf-pin-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 1rem;
}

.pf-pin-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: pf-pin-dot 1s ease-in-out infinite;
}

.pf-pin-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.pf-pin-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pf-pin-dot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

body[data-page="login"] .site-lock-error {
  margin: 0 0 12px;
  min-height: 1.2em;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
}

.field-error {
  margin: 6px 0 0;
  color: var(--red, #dc2626);
  font-size: 12px;
  font-weight: 600;
}

.consent-banner {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.consent-banner p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-faq {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.pf-faq h2 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 1.05rem;
}

.pf-faq h3 {
  margin: 16px 0 6px;
  font-size: 0.95rem;
}

.pf-faq p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.donate-legal {
  margin: 24px 0 0;
  text-align: center;
  font-size: 13px;
}

/* ---- Legal pages ---- */
.legal-page {
  padding: 12px 8px 48px;
  text-align: left;
}

.legal-page > .page-label {
  display: flex;
  width: fit-content;
  margin: 0 auto 12px;
}

.legal-page > h1,
.legal-page > .lead {
  text-align: center;
}

.legal-page h2 {
  margin: 28px 0 10px;
  font-size: 1.1rem;
}

.legal-page p,
.legal-page li {
  color: var(--text);
  line-height: 1.6;
}

.legal-page ul {
  padding-left: 1.2rem;
}

@media (max-width: 720px) {
  .pf-meta-grid {
    grid-template-columns: 1fr;
  }

  .pf-section-head {
    flex-direction: column;
  }

  .pf-section-head--compact {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
  }

  .pf-section-head--compact .pf-mini-heading {
    flex: none;
    width: 100%;
  }

  .pf-section-head--compact .pf-section-actions {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  .pf-section-head--compact .pf-section-actions .pf-tool-btn,
  .pf-section-head--compact .pf-tool-btn--primary {
    flex: 1 1 auto;
    margin-left: 0;
  }
}

/* ---- Checklist polish ---- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 10000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text, #0f172a);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

h1,
.lead,
.dash-sales-history-heading,
.pf-page-hero h1 {
  text-wrap: balance;
}

@supports (corner-shape: squircle) {
  .dash-work-panels-card,
  .donate-card,
  .site-leave-dialog-panel {
    corner-shape: squircle;
  }

  /* Bottom sheets must stay square at the screen edge */
  @media (max-width: 900px) {
    body[data-page="admin"] dialog.pf-dialog .site-leave-dialog-panel {
      corner-shape: initial;
    }
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

@supports (view-transition-name: none) {
  #overview,
  #donations,
  #employees,
  #geography {
    view-transition-name: pf-section;
  }
}

.pf-kbd {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  background: var(--surface-2, #f8fafc);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}

.dashboard-skeleton {
  margin: 0 0 24px;
}

.dashboard-skeleton .skeleton-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-skeleton .skeleton-card,
.dashboard-skeleton .skeleton-row {
  border-radius: 14px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: pf-skeleton 1.1s ease-in-out infinite;
}

.dashboard-skeleton .skeleton-card {
  height: 72px;
}

.dashboard-skeleton .skeleton-table {
  display: grid;
  gap: 10px;
}

.dashboard-skeleton .skeleton-row {
  height: 44px;
}

@keyframes pf-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

#dashboard-content.is-loading {
  opacity: 0.55;
  transition: opacity 160ms ease;
}

.command-dialog .command-input {
  width: 100%;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 12px;
  font: inherit;
}

.command-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.command-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface-2, #f8fafc);
  font: inherit;
  cursor: pointer;
}

.command-item:hover,
.command-item:focus-visible {
  border-color: var(--border, #cbd5e1);
  outline: none;
}

.owner-console-team-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 8px;
}

.owner-console-stat {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-2, #f8fafc);
}

.owner-console-stat dt {
  margin: 0 0 6px;
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.owner-console-stat dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.list-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list-feed li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.feed-meta {
  color: var(--muted, #64748b);
  font-size: 12px;
  margin-top: 2px;
}

.feed-amount {
  font-weight: 700;
  white-space: nowrap;
}

.geo-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  font-size: 13px;
}

.geo-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2, #e2e8f0);
  overflow: hidden;
}

.geo-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent, #2563eb);
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-skeleton .skeleton-card,
  .dashboard-skeleton .skeleton-row,
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .dashboard-skeleton .skeleton-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf-page-hero-actions {
    flex-wrap: wrap;
  }
}

/* ---- Minimal admin dashboard ---- */
.pf-admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 10px 14px;
  margin: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: #fff;
}

.pf-admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pf-admin-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: block;
}

.pf-admin-brand-copy {
  min-width: 0;
}

.pf-admin-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  line-height: 1.1;
}

.pf-admin-topbar h1 {
  margin: 1px 0 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}

.pf-admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pf-tool-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #d7dde7;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.14s ease,
    box-shadow 0.18s ease;
}

.pf-tool-btn:hover {
  background: #f8fafc;
  border-color: #c5cedb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.pf-tool-btn:active {
  transform: scale(0.97);
}

.pf-tool-btn--primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.pf-tool-btn--primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.pf-admin-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.pf-admin-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.pf-admin-status[data-kind="err"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.pf-admin-status[data-kind="ok"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.pf-pull-indicator {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 0;
  margin: 0 auto;
  overflow: hidden;
  opacity: 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.pf-pull-indicator-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  transform: rotate(calc(var(--pf-pull-progress, 0) * 180deg));
  transition: transform 0.08s linear;
}

.pf-pull-indicator-icon .ico {
  width: 16px;
  height: 16px;
}

body.pf-pulling .pf-pull-indicator,
body.pf-pull-ready .pf-pull-indicator,
body.pf-pull-refreshing .pf-pull-indicator {
  height: calc(var(--pf-pull, 0px) * 0.55 + 28px);
  opacity: 1;
}

body.pf-pull-ready .pf-pull-indicator {
  color: #0f172a;
}

body.pf-pull-refreshing .pf-pull-indicator {
  height: 44px;
  opacity: 1;
}

body.pf-pull-refreshing .pf-pull-indicator-icon {
  animation: pf-pull-spin 0.75s linear infinite;
}

@keyframes pf-pull-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-pull-indicator-icon,
  body.pf-pull-refreshing .pf-pull-indicator-icon {
    animation: none;
    transition: none;
  }
}

.pf-mini-panel {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: none;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.pf-mini-panel:hover {
  border-color: #dbe3ee;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.pf-mini-heading {
  margin: 0 0 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.pf-dashboard-head {
  margin-bottom: 12px;
}

.pf-dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.pf-dashboard-brand .pf-admin-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

.pf-dashboard-brand .pf-mini-heading {
  margin: 0;
}

.pf-signout-btn {
  appearance: none;
  margin-left: auto;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #dc2626 28%, #e2e8f0);
  background: color-mix(in srgb, #dc2626 8%, #fff);
  color: #b91c1c;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pf-signout-btn:hover {
  background: color-mix(in srgb, #dc2626 14%, #fff);
  border-color: color-mix(in srgb, #dc2626 45%, #e2e8f0);
  color: #991b1b;
}

.pf-signout-btn:active {
  background: color-mix(in srgb, #dc2626 20%, #fff);
}

.pf-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0 auto;
  width: 100%;
  max-width: 640px;
  justify-content: center;
}

.pf-stat {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
  color: #0f172a;
  font: inherit;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pf-stat:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.pf-stat:active {
  transform: scale(0.98);
}

.pf-stat-label {
  margin: 0;
  font-size: 10px;
  font-weight: 650;
  color: #64748b;
}

.pf-stat-value {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.pf-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pf-donation-list,
.pf-employee-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-height: min(360px, 52vh);
  overflow-x: hidden;
  overflow-y: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  min-width: 0;
  max-width: 100%;
}

.pf-donation-list::-webkit-scrollbar,
.pf-employee-list::-webkit-scrollbar {
  width: 6px;
}

.pf-donation-list::-webkit-scrollbar-thumb,
.pf-employee-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.pf-donation-list::-webkit-scrollbar-track,
.pf-employee-list::-webkit-scrollbar-track {
  background: transparent;
}

.pf-donation-row,
.pf-employee-row {
  padding: 14px 10px;
  margin-inline: 0;
  border-bottom: 1px solid var(--border, #eef2f7);
  border-radius: 12px;
  outline: none;
  box-shadow: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

body[data-page="admin"] .pf-employee-row {
  padding: 8px 10px;
  margin: 0;
  border: 1px solid #e8eef5;
  border-bottom: 1px solid #e8eef5;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.pf-donation-row {
  padding: 10px 12px;
  margin: 0 0 6px;
  border: 1px solid #e8eef5;
  border-bottom: 1px solid #e8eef5;
  border-radius: 10px;
  background: #fff;
  min-height: 0;
}

body[data-page="admin"] .pf-donation-row {
  padding: 8px 10px;
  margin: 0;
  border-radius: 10px;
  min-height: 0;
  box-shadow: none;
}

.pf-donation-row:hover,
.pf-employee-row:hover {
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body[data-page="admin"] .pf-employee-row:hover {
  background: #fff;
  border-color: #dbe4ef;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.pf-donation-row:hover {
  background: #fff;
  border-color: #dbe4ef;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.pf-employee-row:active {
  transform: scale(0.995);
}

.pf-donation-row:focus,
.pf-donation-row:focus-visible,
.pf-employee-row:focus,
.pf-employee-row:focus-visible,
.pf-donation-list:focus,
.pf-donation-list:focus-visible {
  outline: none;
  box-shadow: none;
}

.pf-donation-row:last-child {
  margin-bottom: 0;
}

.pf-employee-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

body[data-page="admin"] .pf-employee-row:last-child {
  border-bottom: 1px solid #e8eef5;
  padding-bottom: 8px;
}

.pf-donation-main {
  display: grid;
  gap: 6px;
}

body[data-page="admin"] .pf-donation-main {
  gap: 4px;
}

.pf-donation-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 0;
}

.pf-donation-identity {
  min-width: 0;
}

.pf-donation-donor,
.pf-donation-top strong {
  display: block;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

body[data-page="admin"] .pf-donation-donor,
body[data-page="admin"] .pf-donation-top strong {
  font-size: 0.84rem;
}

.pf-donation-when,
.pf-donation-employee {
  margin: 2px 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.3;
}

.pf-donation-employee {
  color: #64748b;
  font-weight: 600;
}

.pf-donation-row .feed-amount {
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

body[data-page="admin"] .pf-donation-row .feed-amount {
  font-size: 0.88rem;
}

.pf-don-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0;
  margin: 0;
  width: fit-content;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pf-don-more:hover {
  color: #0f172a;
}

.pf-donation-more {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

body[data-page="admin"] .pf-donation-more {
  margin-top: 4px;
  padding-top: 4px;
}

.pf-donation-more[hidden] {
  display: none !important;
}

.pf-donation-details {
  margin: 0;
  display: grid;
  gap: 6px;
}

.pf-donation-details > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  font-size: 0.72rem;
  line-height: 1.4;
}

.pf-donation-details dt {
  margin: 0;
  color: #94a3b8;
  font-weight: 600;
}

.pf-donation-details dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}

.pf-donation-details code {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1f5f9;
}

.pf-muted {
  color: var(--muted, #94a3b8);
  font-weight: 500;
}

.pf-geo-chart {
  width: 100%;
  max-width: 260px;
  min-height: 0;
  max-height: 64px;
  margin: 0;
  padding: 2px 0 0;
  box-sizing: border-box;
  overflow: hidden;
}

.pf-geo-svg {
  width: 100%;
  max-width: 260px;
  max-height: 64px;
  height: auto;
  display: block;
}

.pf-geo-label {
  fill: var(--text, #334155);
  font-size: 7.5px;
  font-family: inherit;
}

.pf-geo-track {
  fill: var(--surface-2, #e2e8f0);
}

.pf-geo-bar {
  fill: #0f172a;
}

.pf-geo-count {
  fill: var(--muted, #64748b);
  font-size: 7.5px;
  font-weight: 650;
  font-family: inherit;
}

.pf-section-head--compact {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  width: 100%;
}

.pf-section-head--compact .pf-mini-heading {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.pf-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.pf-section-head--compact .pf-section-actions .pf-tool-btn {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 9px;
  margin-left: 0;
  flex-shrink: 0;
}

.pf-section-head--compact .pf-tool-btn--primary {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 9px;
  margin-left: auto;
  flex-shrink: 0;
}

.pf-inbox-hint {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted, #64748b);
}

.pf-employee-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 0;
  min-width: 0;
  flex-shrink: 0;
  overflow: hidden;
}

body[data-page="admin"] .pf-employee-row {
  min-height: 0;
  gap: 8px;
}

.pf-employee-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

body[data-page="admin"] .pf-employee-identity {
  gap: 8px;
}

.pf-employee-identity > .pf-avatar {
  flex-shrink: 0;
}

.pf-avatar-btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 0;
}

.pf-avatar,
.pf-avatar-preview {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  background: #e5e7eb;
  border: 1px solid var(--border, #e2e8f0);
  display: block;
}

.pf-employee-row .pf-avatar {
  width: 36px;
  height: 36px;
}

body[data-page="admin"] .pf-employee-row .pf-avatar {
  width: 32px;
  height: 32px;
}

.pf-emp-identity-block {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  justify-items: stretch;
}

.pf-emp-name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  min-width: 0;
}

.pf-emp-name-fields .field {
  margin-bottom: 0;
}

.pf-avatar-editor {
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.pf-avatar-pick {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 0 0 1px var(--border, #e2e8f0);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pf-avatar-pick:hover {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #0f172a) 28%, var(--border, #e2e8f0));
}

.pf-avatar-pick:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #0f172a) 35%, transparent);
}

.pf-avatar-pick:active {
  transform: scale(0.98);
}

.pf-avatar-preview {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
}

.pf-avatar-reset {
  appearance: none;
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 50%;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.pf-avatar-reset:hover,
.pf-avatar-reset:focus-visible {
  outline: none;
  border-color: #94a3b8;
  background: #f8fafc;
  color: #0f172a;
}

.pf-avatar-reset:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #0f172a) 35%, transparent);
}

@media (max-width: 420px) {
  .pf-emp-name-fields {
    grid-template-columns: 1fr;
  }
}

.pf-employee-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  line-height: 1.3;
  overflow: hidden;
}

body[data-page="admin"] .pf-employee-main {
  gap: 2px;
}

.pf-employee-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.pf-employee-main strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

body[data-page="admin"] .pf-employee-main strong {
  font-size: 0.84rem;
  letter-spacing: -0.02em;
}

.pf-employee-joined {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted, #64748b);
  white-space: nowrap;
}

body[data-page="admin"] .pf-employee-joined {
  font-size: 0.66rem;
}

.pf-employee-meta {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--muted, #64748b);
}

.pf-employee-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

body[data-page="admin"] .pf-employee-stats {
  gap: 4px;
  margin-top: 2px;
}

.pf-stat-chip {
  appearance: none;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  border: 1px solid var(--border, #e2e8f0);
  background: #f8fafc;
  color: var(--text, #0f172a);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.1;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.14s ease;
}

body[data-page="admin"] .pf-stat-chip {
  font-size: 10px;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 6px;
}

.pf-stat-chip-label {
  color: var(--muted, #64748b);
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: 8px;
}

body[data-page="admin"] .pf-stat-chip-label {
  font-size: 8px;
}

.pf-stat-chip-value {
  font-weight: 750;
  font-size: 10px;
  color: #0f172a;
}

body[data-page="admin"] .pf-stat-chip-value {
  font-size: 11px;
}

button.pf-stat-chip--link {
  cursor: pointer;
  background: #fff;
  color: #0f172a;
}

button.pf-stat-chip--link:hover,
button.pf-stat-chip--link:focus-visible {
  border-color: #94a3b8;
  outline: none;
}

.pf-mini-subheading {
  margin: 12px 0 6px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.pf-activity-locations {
  margin-top: 4px;
}

.pf-visits-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.pf-visits-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 8px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
}

.pf-visits-row strong {
  font-variant-numeric: tabular-nums;
}

.pf-admin-toolbar .btn.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}

.pf-employee-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
  margin: 0;
}

.pf-employee-actions .btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 9px;
  white-space: nowrap;
}

body[data-page="admin"] .pf-employee-actions .btn-sm {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 7px;
  font-weight: 650;
}

/* Sheet drag handle is injected for mobile dismiss; hide on desktop layouts. */
.pf-sheet-handle {
  display: none !important;
}

.pf-emp-detail {
  text-align: left;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.pf-emp-detail-scroll {
  min-width: 0;
  width: 100%;
}

.pf-emp-detail-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  text-align: left;
  min-width: 0;
}

.pf-emp-detail-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}

.pf-emp-detail-identity {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 4px;
  justify-items: start;
}

.pf-emp-detail-copy .site-leave-dialog-title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pf-emp-detail-phone {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.pf-emp-detail-copy .pf-seg {
  flex: 0 0 auto;
  margin-left: 0;
}

.pf-avatar--lg {
  width: 72px;
  height: 72px;
}

.pf-detail-avatar-wrap {
  position: relative;
  width: fit-content;
  margin: 0;
  flex: 0 0 auto;
}

.pf-detail-avatar-btn {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
  display: block;
}

.pf-detail-avatar-btn:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 3px;
}

.pf-detail-avatar-btn:hover .pf-avatar--lg {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.pf-detail-avatar-reset {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.pf-detail-avatar-reset:hover {
  background: #f8fafc;
}

.pf-seg {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  background: #f8fafc;
}

.pf-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  min-height: 32px;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.pf-seg-btn + .pf-seg-btn {
  border-left: 1px solid #e2e8f0;
}

.pf-seg-btn:hover {
  background: #f1f5f9;
}

.pf-seg-btn:active {
  background: #e2e8f0;
}

.pf-chip-btn--icon {
  width: 32px;
  min-width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pf-chip-btn--icon .ico {
  width: 14px;
  height: 14px;
}

.pf-emp-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  max-width: none;
  width: 100%;
}

.pf-emp-stat {
  margin: 0;
  padding: 12px 8px;
  border-radius: 14px;
  background: #f8fafc;
  border: 0;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pf-emp-stat:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.pf-emp-stat-label {
  display: block;
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.pf-emp-stat-value {
  display: block;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a !important;
  word-break: break-word;
}

.pf-emp-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 16px;
  max-width: 420px;
}

.pf-emp-detail-foot {
  justify-content: center !important;
}

.pf-chip-btn {
  appearance: none;
  border: 0;
  background: #f1f5f9;
  color: #0f172a;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    transform 0.14s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.pf-chip-btn:hover {
  background: #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.pf-chip-btn:active {
  transform: scale(0.97);
}

.pf-chip-btn--danger {
  color: #b91c1c;
  background: #fef2f2;
}

.pf-chip-btn--danger:hover {
  background: #fee2e2;
}

.pf-donation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

.pf-donation-actions .pf-chip-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.68rem;
}

.pf-info-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.pf-info-list li {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
}

.pf-emp-menu {
  position: relative;
}

.pf-emp-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 148px;
  padding: 4px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  display: none;
  gap: 2px;
}

.pf-emp-menu.is-open .pf-emp-menu-panel {
  display: grid;
}

.pf-emp-menu-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  color: var(--text, #0f172a);
  cursor: pointer;
}

.pf-emp-menu-item:hover,
.pf-emp-menu-item:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.feed-amount {
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  body.pf-no-sidebar .main,
  body[data-page="admin"] .main {
    padding: 14px 14px 64px !important;
  }

  body[data-page="admin"] #page-body.pf-admin-minimal {
    max-width: 100%;
    padding-inline: 0;
    gap: 10px;
  }

  /* Closed sheets must stay hidden — never override UA display:none without [open] */
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog:not([open]),
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide:not([open]) {
    display: none !important;
  }

  /* Bottom-pinned sheet host. Do NOT track visualViewport.offsetTop — that
     made the panel jump/glitch downward when browser chrome moved. */
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog[open],
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide[open] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    inset: auto !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: var(--pf-sheet-vh, 100dvh) !important;
    max-height: var(--pf-sheet-vh, 100dvh) !important;
    transform: none !important;
    translate: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog::backdrop,
  body[data-page="admin"] dialog.pf-dialog.site-leave-dialog--wide::backdrop {
    background: rgba(15, 23, 42, 0.42);
  }

  body[data-page="admin"] dialog.pf-dialog.is-entering::backdrop,
  body[data-page="admin"] dialog.pf-dialog.is-closing::backdrop {
    opacity: 0;
  }

  body[data-page="admin"] dialog.pf-dialog .site-leave-dialog-panel {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    flex: 0 1 auto;
    padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: var(--pf-sheet-panel-max, min(72svh, calc(var(--pf-sheet-vh, 100svh) - 48px))) !important;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 22px 22px 0 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    corner-shape: initial !important;
    border: 1px solid var(--border, #e2e8f0);
    border-bottom: 0 !important;
    background: var(--surface, #fff) !important;
    box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.18);
    touch-action: pan-y;
    box-sizing: border-box;
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  }

  /* QR / Delete / other action sheets: scroll body + pinned footer buttons */
  body[data-page="admin"] dialog.pf-dialog .site-leave-dialog-panel.pf-sheet-panel {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 16px !important;
    max-height: var(--pf-sheet-panel-max, min(72svh, calc(var(--pf-sheet-vh, 100svh) - 48px))) !important;
  }

  body[data-page="admin"] dialog.pf-dialog .pf-sheet-scroll {
    flex: 1 1 0% !important;
    height: 0 !important;
    min-height: 0 !important;
    min-width: 0;
    width: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y !important;
    padding: 4px 0 10px;
    box-sizing: border-box;
  }

  body[data-page="admin"] dialog.pf-dialog .pf-sheet-panel > .pf-sheet-handle {
    flex: 0 0 auto;
  }

  body[data-page="admin"] dialog.pf-dialog .pf-sheet-panel > .site-leave-dialog-actions {
    position: relative !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
    margin-top: 0 !important;
    padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: var(--surface, #fff);
    box-shadow: 0 -8px 16px rgba(255, 255, 255, 0.95);
    z-index: 4;
  }

  body[data-page="admin"] #qr-dialog .qr-box {
    margin: 8px 0 4px;
    padding: 14px;
  }

  body[data-page="admin"] #qr-dialog .qr-box canvas,
  body[data-page="admin"] #qr-dialog #qr-canvas-host img,
  body[data-page="admin"] #qr-dialog #qr-canvas-host canvas {
    max-width: min(220px, 56vw) !important;
    height: auto !important;
  }

  body[data-page="admin"] #qr-dialog .site-leave-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  body[data-page="admin"] #qr-dialog .site-leave-dialog-actions .btn:last-child {
    grid-column: 1 / -1;
  }

  /* Use 100dvh (not 100%) so slide distance stays stable if panel height reflows. */
  body[data-page="admin"] dialog.pf-dialog[open]:not(.is-open):not(.is-closing) .site-leave-dialog-panel,
  body[data-page="admin"] dialog.pf-dialog.is-entering .site-leave-dialog-panel {
    transform: translate3d(0, 100dvh, 0);
    transition: none !important;
  }

  body[data-page="admin"] dialog.pf-dialog.is-open:not(.is-entering):not(.is-closing):not(.is-dragging):not(.is-settled) .site-leave-dialog-panel {
    transform: translate3d(0, 0, 0);
  }

  /* Drop transform after the slide finishes so buttons/scroll stay solid. */
  body[data-page="admin"] dialog.pf-dialog.is-settled:not(.is-dragging):not(.is-closing) .site-leave-dialog-panel {
    transform: none !important;
    transition: none !important;
  }

  body[data-page="admin"] dialog.pf-dialog.is-dragging .site-leave-dialog-panel {
    transition: none !important;
    touch-action: none !important;
    overflow-y: hidden;
  }

  body[data-page="admin"] dialog.pf-dialog.is-closing .site-leave-dialog-panel {
    transform: translate3d(0, 100dvh, 0) !important;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
  }

  @media (prefers-reduced-motion: reduce) {
    body[data-page="admin"] dialog.pf-dialog .site-leave-dialog-panel,
    body[data-page="admin"] dialog.pf-dialog.is-closing .site-leave-dialog-panel {
      transition: none !important;
    }
  }

  /* Real drag handle (JS inserts .pf-sheet-handle). Pseudo pill kept as fallback only. */
  body[data-page="admin"] dialog.pf-dialog .site-leave-dialog-panel:not(:has(> .pf-sheet-handle))::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    margin: 6px auto 14px;
    border-radius: 999px;
    background: #cbd5e1;
  }

  body[data-page="admin"] dialog.pf-dialog .pf-sheet-handle {
    appearance: none;
    display: block !important;
    width: 100%;
    height: 32px;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    flex: 0 0 auto;
  }

  body[data-page="admin"] dialog.pf-dialog .pf-sheet-handle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 10px;
    width: 44px;
    height: 5px;
    margin-left: -22px;
    border-radius: 999px;
    background: #cbd5e1;
  }

  body[data-page="admin"] dialog.pf-dialog .pf-sheet-handle:active {
    cursor: grabbing;
  }

  .pf-dialog .site-leave-dialog-actions {
    position: relative;
    bottom: auto;
    z-index: 3;
    margin-top: 12px;
    padding: 0 0 2px;
    background: var(--surface, #fff);
    box-shadow: none;
    justify-content: stretch;
  }

  .pf-dialog .site-leave-dialog-actions .btn {
    flex: 1 1 auto;
  }

  .pf-dialog .field,
  .pf-dialog .pf-emp-identity-block,
  .pf-dialog .site-leave-dialog-title,
  .pf-dialog .site-leave-dialog-text,
  .pf-dialog .qr-box,
  .pf-dialog .pf-emp-detail-stats,
  .pf-dialog .pf-emp-detail-actions,
  .pf-dialog .pf-payout-summary {
    flex-shrink: 0;
  }

  .pf-dialog .pf-avatar-preview {
    width: 64px;
    height: 64px;
  }

  .pf-dialog .pf-avatar-reset {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .pf-dialog .ui-select-menu {
    max-height: min(200px, 34dvh);
  }

  .pf-dock {
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    gap: 5px;
    padding: 6px;
    border-radius: 16px;
  }

  .pf-dock-brand {
    display: none;
  }

  .pf-dock-tab {
    font-size: 10.5px;
    min-height: 34px;
    padding: 0 2px;
  }

  .pf-dock-tab-full {
    display: inline;
  }

  .pf-dock-tab-short {
    display: none;
  }

  .pf-dock-tool {
    font-size: 10px;
    padding: 0 6px;
    min-height: 32px;
  }

  .pf-dock-tool--icon {
    width: 32px;
    min-width: 32px;
  }

  .pf-dock .pf-admin-logo {
    width: 28px;
    height: 28px;
  }

  .pf-section-head--compact {
    flex-direction: column !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
  }

  .pf-section-head--compact .pf-mini-heading {
    flex: none;
    width: 100%;
  }

  .pf-section-head--compact .pf-section-actions {
    gap: 6px;
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  .pf-section-head--compact .pf-section-actions .pf-tool-btn,
  .pf-section-head--compact .pf-tool-btn--primary {
    min-width: 0;
    padding: 0 10px;
    white-space: nowrap;
    flex: 1 1 auto;
    margin-left: 0;
  }

  .pf-mini-panel {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .pf-admin-stack {
    gap: 10px;
  }

  .pf-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .pf-stat {
    padding: 8px;
  }

  .pf-admin-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pf-donation-list,
  .pf-employee-list {
    max-height: none;
  }

  body[data-page="admin"] .pf-employee-list,
  body[data-page="admin"] .pf-donation-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pf-employee-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .pf-employee-stats {
    max-width: 100%;
  }

  .pf-employee-actions {
    max-width: none;
    width: auto;
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 4px;
  }

  .pf-employee-actions .btn {
    width: auto;
    justify-content: center;
    padding-inline: 8px;
    font-size: 11px;
  }

  .pf-emp-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  /* Volunteer detail: compact sheet that fits the phone.
     Close stays pinned; middle scrolls only if still needed. */
  body[data-page="admin"] #employee-detail-dialog[open] {
    z-index: 80;
  }

  body[data-page="admin"] #employee-detail-dialog .site-leave-dialog-panel.pf-emp-detail {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    max-height: min(88dvh, calc(var(--pf-sheet-vh, 100dvh) - 8px)) !important;
    overflow: hidden !important;
    padding: 0 14px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-sheet-handle {
    flex: 0 0 auto;
    height: 28px;
    margin: 0;
    background: var(--surface, #fff);
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-scroll {
    flex: 0 1 auto !important;
    height: auto !important;
    max-height: none;
    min-height: 0 !important;
    min-width: 0;
    width: 100%;
    overflow: visible !important;
    padding: 0 0 10px;
    box-sizing: border-box;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    text-align: left;
    min-width: 0;
    width: 100%;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-detail-avatar-wrap {
    margin: 0;
    flex: 0 0 auto;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-avatar--lg {
    width: 44px;
    height: 44px;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-detail-avatar-reset {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-copy {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    gap: 6px;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-identity {
    justify-items: start;
    width: 100%;
    min-width: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-copy .site-leave-dialog-title {
    font-size: 0.98rem !important;
    text-align: left;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.15;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-phone {
    text-align: left;
    max-width: 100%;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-copy .pf-seg {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-seg-btn {
    min-height: 34px;
    font-size: 12px;
    padding: 0 8px;
    min-width: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-seg-btn + .pf-seg-btn {
    border-left: 1px solid #e2e8f0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 8px;
    width: 100%;
    min-width: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-stat {
    padding: 8px 4px;
    border-radius: 10px;
    min-width: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-stat-label {
    font-size: 9px;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-stat-value {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin: 0;
    justify-content: stretch;
    min-width: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-chip-btn {
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 12px;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-chip-btn--icon {
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-foot {
    position: relative !important;
    bottom: auto !important;
    margin: 10px 0 0 !important;
    flex: 0 0 auto !important;
    width: 100%;
    padding: 0 !important;
    box-shadow: none;
    background: var(--surface, #fff);
    z-index: 4;
  }

  body[data-page="admin"] #employee-detail-dialog .pf-emp-detail-foot .btn {
    min-height: 46px;
    width: 100%;
  }

  .pf-stat-strip {
    max-width: none;
  }

  .pf-stat-value {
    font-size: 0.88rem;
  }

  .pf-donation-row {
    padding: 12px 10px;
  }

  .menu-btn {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 8px !important;
    left: 10px !important;
    top: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-admin-page,
  .pf-admin-page.is-active,
  .pf-admin-page.is-exit,
  .pf-dock,
  .pf-dock-tab,
  .pf-dock-tool,
  .pf-dock-tool .ico,
  .pf-tool-btn,
  .pf-mini-panel,
  .pf-stat,
  .pf-donation-row,
  .pf-employee-row,
  .pf-stat-chip,
  .pf-emp-stat,
  .pf-chip-btn {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Soft press feedback for common admin buttons */
body[data-page="admin"] .btn,
body[data-page="admin"] .pf-tool-btn,
body[data-page="admin"] .pf-dock-tab,
body[data-page="admin"] .pf-dock-tool {
  -webkit-tap-highlight-color: transparent;
}

body[data-page="admin"] .btn {
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.14s ease,
    box-shadow 0.18s ease;
}

body[data-page="admin"] .btn:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

body[data-page="admin"] .btn:active {
  transform: scale(0.97);
}

/* ---- Public donate (Stripe Checkout) ---- */
.donate-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background:
    radial-gradient(1200px 500px at 50% -10%, #e2e8f0 0%, transparent 60%),
    #f8fafc;
}

.pf-donate-card {
  width: min(420px, 100%);
  padding: 28px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.pf-donate-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 12px;
}

.pf-donate-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.pf-donate-lead,
.pf-donate-attr,
.pf-donate-note {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.45;
}

.pf-donate-attr {
  font-weight: 700;
  color: #0f172a;
}

.pf-amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 14px;
}

.pf-amount-btn {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  min-height: 42px;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.pf-amount-btn:hover {
  background: #f1f5f9;
}

.pf-amount-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.pf-amount-btn:active {
  transform: scale(0.97);
}

.pf-donate-label {
  display: block;
  margin: 10px 0 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.pf-donate-submit {
  width: 100%;
  margin-top: 16px;
  min-height: 48px;
}

.pf-donate-success h2 {
  margin: 0 0 8px;
  color: #0f172a;
}

.pf-donate-success p {
  margin: 0;
  color: #64748b;
}

/* ---- Shared public site system (home + join) ---- */
body[data-page="home"],
body[data-page="join"] {
  --pf-cream: #fff9f3;
  --pf-ink: #2d312b;
  --pf-salmon: #e98b6d;
  --pf-taupe: #ada496;
  --pf-green: #6b8361;
  --pf-peach: #f5ded2;
  --pf-rule: #e5e0d8;
  --pf-btn-radius: 999px;
  --pf-control-radius: 16px;
  --pf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin: 0;
  min-height: 100dvh;
  background: var(--pf-cream);
  color: var(--pf-ink);
  color-scheme: light;
  font-family: "DM Sans", system-ui, sans-serif;
}

/* Shared pill buttons — landing + join */
body[data-page="home"] .pf-btn,
body[data-page="join"] .pf-btn,
body[data-page="home"] a.btn.pf-home-cta,
body[data-page="join"] .btn.pf-join-submit,
body[data-page="join"] .btn.pf-join-secondary {
  appearance: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px !important;
  border-radius: var(--pf-btn-radius) !important;
  border-width: 1.5px !important;
  border-style: solid !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(45, 49, 43, 0.04) !important;
  transform: translateY(0);
  transition:
    background 0.2s var(--pf-ease),
    border-color 0.2s var(--pf-ease),
    color 0.2s var(--pf-ease),
    box-shadow 0.2s var(--pf-ease),
    transform 0.18s var(--pf-ease),
    opacity 0.18s ease;
}

body[data-page="home"] .pf-btn:hover,
body[data-page="join"] .pf-btn:hover,
body[data-page="home"] a.btn.pf-home-cta:hover,
body[data-page="join"] .btn.pf-join-submit:hover,
body[data-page="join"] .btn.pf-join-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(45, 49, 43, 0.12) !important;
}

body[data-page="home"] .pf-btn:active,
body[data-page="join"] .pf-btn:active,
body[data-page="home"] a.btn.pf-home-cta:active,
body[data-page="join"] .btn.pf-join-submit:active,
body[data-page="join"] .btn.pf-join-secondary:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 2px 8px rgba(45, 49, 43, 0.1) !important;
}

body[data-page="home"] .pf-btn:focus-visible,
body[data-page="join"] .pf-btn:focus-visible,
body[data-page="home"] a.btn.pf-home-cta:focus-visible,
body[data-page="join"] .btn.pf-join-submit:focus-visible,
body[data-page="join"] .btn.pf-join-secondary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--pf-peach) 80%, transparent),
    0 8px 20px rgba(45, 49, 43, 0.1) !important;
}

/* Primary = green fill (cream pages) / white fill (hero) */
body[data-page="join"] .pf-btn--primary,
body[data-page="join"] .btn.pf-join-submit {
  background: var(--pf-green) !important;
  border-color: var(--pf-green) !important;
  color: #fff !important;
}

body[data-page="join"] .pf-btn--primary:hover,
body[data-page="join"] .btn.pf-join-submit:hover {
  background: color-mix(in srgb, var(--pf-green) 88%, #000) !important;
  border-color: color-mix(in srgb, var(--pf-green) 88%, #000) !important;
  color: #fff !important;
}

body[data-page="join"] .pf-btn--secondary,
body[data-page="join"] .btn.pf-join-secondary {
  background: #fff !important;
  border-color: var(--pf-rule) !important;
  color: var(--pf-ink) !important;
}

body[data-page="join"] .pf-btn--secondary:hover,
body[data-page="join"] .btn.pf-join-secondary:hover {
  background: var(--pf-peach) !important;
  border-color: color-mix(in srgb, var(--pf-salmon) 28%, var(--pf-rule)) !important;
  color: var(--pf-ink) !important;
}

/* ---- Public join / promoter signup ---- */
body[data-page="join"] #shell,
body[data-page="join"] .site-lock,
body[data-page="join"] #site-lock {
  display: none !important;
}

body[data-page="join"] #page-body.pf-join-page,
body[data-page="join"] #page-body {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--pf-cream) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.pf-join-page {
  --join-pad: 16px;
  --join-max: 480px;
  min-height: 100dvh;
  box-sizing: border-box;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    var(--join-pad)
    calc(28px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(900px 420px at 8% -8%, color-mix(in srgb, var(--pf-peach) 45%, transparent), transparent 70%),
    radial-gradient(700px 360px at 100% 0%, color-mix(in srgb, var(--pf-salmon) 8%, transparent), transparent 60%),
    var(--pf-cream);
}

.pf-join-top {
  width: min(var(--join-max), 100%);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pf-join-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--pf-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 750;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.pf-join-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.pf-join-top-link {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--pf-ink);
  text-decoration: none;
  opacity: 0.65;
}

.pf-join-top-link:hover {
  opacity: 1;
}

.pf-join-main {
  width: min(var(--join-max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.pf-join-intro {
  text-align: left;
  max-width: none;
}

.pf-join-kicker {
  margin: 0 0 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--pf-taupe);
}

.pf-join-title {
  margin: 0 0 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.65rem, 4.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--pf-ink);
  text-wrap: balance;
}

.pf-join-lead {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 450;
  line-height: 1.55;
  color: color-mix(in srgb, var(--pf-ink) 62%, var(--pf-taupe));
  text-wrap: pretty;
}

.pf-join-lead strong {
  color: var(--pf-ink);
  font-weight: 700;
}

.pf-join-points {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.pf-join-points li {
  position: relative;
  padding-left: 1rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--pf-ink);
}

.pf-join-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pf-salmon);
}

.pf-join-panel {
  width: 100%;
  padding: 20px 18px;
  border: 1px solid var(--pf-rule);
  border-radius: 22px;
  background: color-mix(in srgb, #fff 92%, var(--pf-cream));
  box-shadow: 0 12px 32px rgba(45, 49, 43, 0.05);
  box-sizing: border-box;
}

.pf-join-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 520px) {
  .pf-join-page {
    --join-pad: 24px;
    --join-max: 520px;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .pf-join-top {
    margin-bottom: 28px;
  }

  .pf-join-main {
    gap: 22px;
  }

  .pf-join-panel {
    padding: 22px 20px;
  }

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

.pf-join-form .field {
  margin: 0 0 12px;
}

.pf-join-form .field > label:not(.pf-join-check),
.pf-join-label {
  display: block;
  margin-bottom: 6px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--pf-ink);
}

.pf-join-form .field input:not([type="checkbox"]),
.pf-join-form .field select,
.pf-join-share-input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid var(--pf-rule);
  border-radius: var(--pf-control-radius);
  background: #fff;
  color: var(--pf-ink);
  font: inherit;
  font-size: 16px;
  transition:
    border-color 0.18s var(--pf-ease),
    box-shadow 0.18s var(--pf-ease),
    background 0.18s var(--pf-ease);
}

.pf-join-form .field input:not([type="checkbox"]):hover,
.pf-join-form .field select:hover,
.pf-join-share-input:hover {
  border-color: color-mix(in srgb, var(--pf-ink) 18%, var(--pf-rule));
}

.pf-join-form .field input:not([type="checkbox"]):focus,
.pf-join-form .field select:focus,
.pf-join-share-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--pf-green) 55%, var(--pf-rule));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pf-peach) 70%, transparent);
}

.pf-join-form .ui-select-trigger {
  min-height: 48px;
  border-radius: var(--pf-control-radius);
  border-color: var(--pf-rule);
  background: #fff;
}

.pf-join-fineprint {
  margin: 12px 0 0;
  color: var(--pf-taupe);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
}

.pf-join-fineprint a {
  color: var(--pf-ink);
  font-weight: 650;
}

.pf-join-fineprint a:hover {
  color: var(--pf-salmon);
}

.pf-join-submit {
  width: 100%;
  margin-top: 6px;
}

.pf-join-secondary {
  /* inherits shared .pf-btn secondary */
}

.pf-join-success {
  text-align: left;
}

.pf-join-success .pf-join-lead {
  margin-bottom: 8px;
}

.pf-join-msg {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--pf-rule);
  background: color-mix(in srgb, var(--pf-peach) 35%, #fff);
  color: var(--pf-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.pf-join-success .pf-join-qr {
  margin-left: 0;
}

.pf-join-success .pf-join-actions {
  justify-content: flex-start;
}

.pf-join-success .pf-join-share-input {
  text-align: left;
}

.pf-join-qr {
  display: grid;
  place-items: center;
  margin: 14px auto;
  min-height: 200px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--pf-rule);
}

.pf-join-qr canvas,
.pf-join-qr img {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  background: #fff;
}

.pf-join-share-input {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.pf-join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.pf-join-actions .btn {
  min-width: 120px;
  flex: 1 1 120px;
}

.pf-join-actions .pf-join-submit {
  margin-top: 0;
}

body[data-page="join"] .status-banner {
  margin-bottom: 12px;
  border-radius: 10px;
}

.pf-join-age {
  margin-top: 2px;
}

.pf-join-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--pf-ink);
  font-weight: 550;
  cursor: pointer;
}

.pf-join-check span {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 1px;
}

.pf-join-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  margin: 2px 0 0;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  padding: 0;
  flex: 0 0 20px;
  border: 1.5px solid var(--pf-rule);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  accent-color: var(--pf-green);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.pf-join-check input[type="checkbox"]:hover {
  border-color: color-mix(in srgb, var(--pf-green) 45%, var(--pf-rule));
}

.pf-join-check input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--pf-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pf-peach) 70%, transparent);
}

.pf-join-check input[type="checkbox"]:checked {
  background: var(--pf-green);
  border-color: var(--pf-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}


.pf-home-faq {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 72px;
  color: var(--pf-ink);
  text-align: left;
}

.pf-faq-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.pf-faq-item {
  border-bottom: 1px solid var(--pf-rule, #e5e0d8);
  padding: 0;
}

.pf-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  color: var(--pf-ink, #2d312b);
  list-style: none;
  transition: color 0.2s ease;
}

.pf-faq-item summary::-webkit-details-marker {
  display: none;
}

.pf-faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: -3px;
  border-right: 2px solid var(--pf-taupe, #ada496);
  border-bottom: 2px solid var(--pf-taupe, #ada496);
  transform: rotate(45deg);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

.pf-faq-item.is-open summary,
.pf-faq-item:not(.pf-faq-item--js)[open] summary {
  color: var(--pf-green, #6b8361);
}

.pf-faq-item.is-open summary::after,
.pf-faq-item:not(.pf-faq-item--js)[open] summary::after {
  margin-top: 3px;
  border-color: var(--pf-green, #6b8361);
  transform: rotate(225deg);
}

.pf-faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-faq-item.is-open .pf-faq-panel,
.pf-faq-item:not(.pf-faq-item--js)[open] .pf-faq-panel {
  grid-template-rows: 1fr;
}

.pf-faq-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.pf-faq-item p {
  margin: 0 0 18px;
  color: var(--pf-taupe, #ada496);
  line-height: 1.55;
  font-size: 0.98rem;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.28s ease 0.04s,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-faq-item.is-open p,
.pf-faq-item:not(.pf-faq-item--js)[open] p {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .pf-faq-panel,
  .pf-faq-item summary::after,
  .pf-faq-item p {
    transition: none;
  }
}

/* ---- Legal pages (privacy / terms) ---- */
body[data-page="legal"] {
  --pf-cream: #fff9f3;
  --pf-ink: #2d312b;
  --pf-salmon: #e98b6d;
  --pf-taupe: #ada496;
  --pf-green: #6b8361;
  --pf-peach: #f5ded2;
  --pf-rule: #e5e0d8;
  margin: 0;
  min-height: 100dvh;
  background: var(--pf-cream);
  color: var(--pf-ink);
  color-scheme: light;
}

body[data-page="legal"] #shell,
body[data-page="legal"] .site-lock,
body[data-page="legal"] #site-lock {
  display: none !important;
}

body[data-page="legal"] #page-body.pf-legal-page,
body[data-page="legal"] #page-body {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--pf-cream) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.pf-legal-page {
  min-height: 100dvh;
  box-sizing: border-box;
  padding:
    max(20px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    calc(40px + env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
}

.pf-legal-top {
  width: min(720px, 100%);
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pf-legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pf-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.pf-legal-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.pf-legal-nav {
  display: flex;
  gap: 14px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.pf-legal-nav a {
  color: var(--pf-taupe);
  text-decoration: none;
}

.pf-legal-nav a[aria-current="page"],
.pf-legal-nav a:hover {
  color: var(--pf-ink);
}

.pf-legal-article {
  width: min(720px, 100%);
  margin: 0 auto;
}

.pf-legal-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-salmon);
}

.pf-legal-article h1 {
  margin: 0 0 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--pf-ink);
}

.pf-legal-updated {
  margin: 0 0 22px;
  font-size: 0.88rem;
  color: var(--pf-taupe);
}

.pf-legal-article h2 {
  margin: 28px 0 10px;
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--pf-ink);
}

.pf-legal-article p,
.pf-legal-article li {
  font-size: 1rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--pf-ink) 72%, var(--pf-taupe));
}

.pf-legal-article ul {
  margin: 0 0 14px;
  padding-left: 1.2rem;
}

.pf-legal-article li + li {
  margin-top: 6px;
}

.pf-legal-article a {
  color: var(--pf-green);
  font-weight: 650;
}

.pf-legal-article a:hover {
  color: var(--pf-ink);
}

.pf-legal-foot {
  width: min(720px, 100%);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--pf-rule);
  font-size: 0.9rem;
  color: var(--pf-taupe);
}

.pf-legal-foot a {
  color: var(--pf-ink);
  text-decoration: none;
  font-weight: 650;
}

.pf-legal-foot a:hover {
  color: var(--pf-salmon);
}

/* ---- Official landing (home) — palette only ---- */
/* Home is a full-bleed landing — kill dashboard zoom/gutter so hero centers true. */
html:has(body[data-page="home"]) {
  zoom: 1;
  scrollbar-gutter: auto;
}

body[data-page="home"] {
  --pf-cream: #fff9f3;
  --pf-ink: #2d312b;
  --pf-salmon: #e98b6d;
  --pf-taupe: #ada496;
  --pf-green: #6b8361;
  --pf-peach: #f5ded2;
  --pf-rule: #e5e0d8;
  --ui-scale: 1;
  margin: 0;
  min-height: 100dvh;
  background: var(--pf-cream);
  color: var(--pf-ink);
  color-scheme: light;
}

body[data-page="home"] #shell,
body[data-page="home"] .site-lock,
body[data-page="home"] #site-lock {
  display: none !important;
}

body[data-page="home"] #page-body.pf-home,
body[data-page="home"] .pf-home,
body[data-page="home"] #page-body {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--pf-cream) !important;
  color: var(--pf-ink);
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Boot loader — circle + % , eases up when ready */
.pf-home-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: var(--pf-cream, #fff9f3);
  transform: translate3d(0, 0, 0);
  transition: transform 1.3s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.pf-home-loader.is-done {
  transform: translate3d(0, -110%, 0);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .pf-home-loader {
    transition: opacity 0.35s ease;
  }

  .pf-home-loader.is-done {
    transform: none;
    opacity: 0;
  }
}

.pf-home-loader-ring {
  position: relative;
  width: 96px;
  height: 96px;
}

.pf-home-loader-svg {
  width: 96px;
  height: 96px;
  display: block;
  transform: rotate(-90deg);
}

.pf-home-loader-track,
.pf-home-loader-progress {
  fill: none;
  stroke-width: 4;
}

.pf-home-loader-track {
  stroke: var(--pf-peach, #f5ded2);
}

.pf-home-loader-progress {
  stroke: var(--pf-green, #6b8361);
  stroke-linecap: round;
  transition: none;
}

.pf-home-loader-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pf-ink, #2d312b);
  font-variant-numeric: tabular-nums;
}

body.pf-home-loading {
  overflow: hidden;
}

/* Top bar + menu (landing) — logo, name, menu only */
.pf-site-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding:
    max(14px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    0
    max(16px, env(safe-area-inset-left, 0px));
  background: transparent;
  border: 0;
  pointer-events: none;
}

.pf-site-bar-brand,
.pf-site-menu-btn {
  pointer-events: auto;
}

.pf-site-bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 12px rgba(45, 49, 43, 0.35);
  transition: color 0.2s ease;
}

.pf-site-bar-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(45, 49, 43, 0.28);
}

.pf-site-menu-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
  filter: drop-shadow(0 1px 10px rgba(45, 49, 43, 0.35));
  transition: opacity 0.16s ease, color 0.2s ease, filter 0.2s ease;
}

.pf-site-menu-btn:hover,
.pf-site-menu-btn[aria-expanded="true"] {
  opacity: 0.85;
  background: transparent;
}

body.pf-site-bar-solid .pf-site-bar-brand,
body.pf-site-bar-solid .pf-site-menu-btn {
  color: var(--pf-ink, #2d312b);
  text-shadow: none;
  filter: none;
}

.pf-site-menu-btn-bars,
.pf-site-menu-btn-bars::before,
.pf-site-menu-btn-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.pf-site-menu-btn-bars {
  position: relative;
}

.pf-site-menu-btn-bars::before,
.pf-site-menu-btn-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.pf-site-menu-btn-bars::before {
  top: -6px;
}

.pf-site-menu-btn-bars::after {
  top: 6px;
}

.pf-site-menu-btn[aria-expanded="true"] .pf-site-menu-btn-bars {
  background: transparent;
}

.pf-site-menu-btn[aria-expanded="true"] .pf-site-menu-btn-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.pf-site-menu-btn[aria-expanded="true"] .pf-site-menu-btn-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.pf-site-menu {
  position: fixed;
  inset: 0;
  z-index: 9100;
}

.pf-site-menu[hidden] {
  display: none !important;
}

.pf-site-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 49, 43, 0.35);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.pf-site-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 100%);
  height: 100%;
  padding:
    calc(72px + env(safe-area-inset-top, 0px))
    22px
    calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--pf-cream, #fff9f3);
  border-left: 1px solid var(--pf-rule, #e5e0d8);
  box-shadow: -18px 0 48px rgba(45, 49, 43, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(0);
  animation: pf-site-menu-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pf-site-menu-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.pf-site-menu-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-taupe, #ada496);
}

.pf-site-menu-panel a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--pf-rule, #e5e0d8);
  text-decoration: none;
  color: var(--pf-ink, #2d312b);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pf-site-menu-panel a:hover,
.pf-site-menu-panel a[aria-current="page"] {
  color: var(--pf-salmon, #e98b6d);
}

.pf-site-menu-close {
  appearance: none;
  margin-top: auto;
  min-height: 46px;
  border: 1px solid var(--pf-rule, #e5e0d8);
  border-radius: 12px;
  background: #fff;
  color: var(--pf-ink, #2d312b);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pf-site-menu-close:hover {
  background: var(--pf-peach, #f5ded2);
}

body.pf-site-menu-open {
  overflow: hidden;
}

.pf-home-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

.pf-home-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1d19 center / cover no-repeat;
  background-image: url("../media/hero-poster.jpg");
}

.pf-home-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.pf-home-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 20, 17, 0.55) 0%, rgba(18, 20, 17, 0.62) 45%, rgba(12, 14, 11, 0.78) 100%),
    radial-gradient(85% 70% at 50% 45%, rgba(45, 49, 43, 0.25) 0%, rgba(10, 12, 9, 0.7) 100%);
  pointer-events: none;
}

.pf-home-fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  background:
    radial-gradient(ellipse at 40% 30%, #2a2e28 0%, transparent 55%),
    #141612;
}

.pf-home-fallback img {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  opacity: 0.92;
  box-shadow: 0 24px 60px rgba(45, 49, 43, 0.18);
}

body.pf-home-reduced-motion .pf-home-video,
body.pf-home-video-failed .pf-home-video {
  display: none;
}

body.pf-home-reduced-motion .pf-home-fallback,
body.pf-home-video-failed .pf-home-fallback {
  display: grid;
}

.pf-home-hero-inner {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 48px));
  margin-inline: auto;
  margin-block: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.pf-home-headline {
  margin: 0 auto;
  max-width: none;
  width: max-content;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.55rem, 6.2vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #ffffff !important;
  text-align: center;
  text-shadow: none;
  white-space: nowrap;
  text-wrap: nowrap;
}

.pf-home-lead {
  margin: 0 auto;
  width: 100%;
  max-width: 28em;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  font-weight: 450;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  text-align: center !important;
  text-wrap: pretty;
}

.pf-home-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: auto;
  max-width: 100%;
  margin: 10px auto 0;
  text-align: center;
}

body[data-page="home"] a.btn.pf-home-cta {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 42px;
  padding: 9px 20px !important;
  font-size: 0.9rem !important;
}

body[data-page="home"] a.btn.pf-home-cta.pf-home-cta--primary,
body[data-page="home"] a.btn.pf-home-cta--primary:not(.secondary) {
  background: #fff !important;
  border-color: #fff !important;
  color: #141612 !important;
}

body[data-page="home"] a.btn.pf-home-cta.pf-home-cta--primary:hover,
body[data-page="home"] a.btn.pf-home-cta--primary:not(.secondary):hover {
  background: #fff !important;
  border-color: #fff !important;
  color: #141612 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22) !important;
}

body[data-page="home"] a.btn.secondary.pf-home-cta,
body[data-page="home"] a.btn.pf-home-cta.pf-home-cta--secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body[data-page="home"] a.btn.secondary.pf-home-cta:hover,
body[data-page="home"] a.btn.pf-home-cta.pf-home-cta--secondary:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: #fff !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2) !important;
}

.pf-home-about {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0 40px;
  text-align: left;
  color: var(--pf-ink);
}

.pf-home-about-kicker {
  margin: 0 0 10px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--pf-taupe);
}

.pf-home-about-title {
  margin: 0 0 20px;
  max-width: 18ch;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--pf-ink);
  text-wrap: balance;
}

.pf-home-about-body {
  margin: 0 0 14px;
  max-width: 38rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(0.98rem, 1.8vw, 1.08rem);
  font-weight: 450;
  line-height: 1.65;
  color: color-mix(in srgb, var(--pf-ink) 62%, var(--pf-taupe));
}

.pf-home-about-body:last-child {
  margin-bottom: 0;
}

.pf-home-how {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 40px;
  color: var(--pf-ink);
  text-align: left;
}

.pf-home-how-title {
  margin: 0 0 22px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--pf-taupe);
}

.pf-home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.pf-home-steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--pf-rule);
}

.pf-home-steps li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pf-home-step-num {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pf-salmon);
  background: var(--pf-peach);
  border: 1px solid color-mix(in srgb, var(--pf-salmon) 22%, var(--pf-peach));
}

.pf-home-steps strong {
  display: block;
  margin: 0 0 4px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pf-ink);
}

.pf-home-steps p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--pf-taupe);
}

.pf-home-foot {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 calc(48px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--pf-rule);
}

.pf-home-foot p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--pf-taupe);
}

.pf-home-foot a {
  color: var(--pf-ink);
  text-decoration: none;
}

.pf-home-foot a:hover {
  color: var(--pf-salmon);
  text-decoration: underline;
}

@media (min-width: 900px) {
  .pf-home-hero-inner {
    width: min(860px, calc(100% - 80px));
    gap: 26px;
  }

  body[data-page="home"] a.btn.pf-home-cta {
    min-height: 48px;
    min-width: 156px;
    padding: 11px 26px !important;
    font-size: 1rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-home-video {
    display: none;
  }

  .pf-home-fallback {
    display: grid;
  }
}
