/* DonorTrack suite: Fraunces headings, Source Sans 3 body, forest green palette */

:root {
  --green-deep: #1b4332;
  --green-mid: #2d6a4f;
  --green-soft: #40916c;
  --green-tint: #d8f3dc;
  --cream: #f8f9f6;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #e2e8e4;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(27, 67, 50, 0.08);
  --danger: #9d0208;
  --danger-bg: #fff5f5;
  --danger-border: #fecaca;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Ensure JS visibility toggles using `hidden` always win over layout styles. */
[hidden] {
  display: none !important;
}

/* Admin: 3px smaller than browser default (16px → 13px); scales all rem-based text */
html {
  font-size: 13px;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.auth-card h2 {
  margin: 0 0 8px;
}

.auth-card .muted {
  margin: 0 0 14px;
}

h1,
h2,
h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  color: var(--green-deep);
  letter-spacing: -0.02em;
}

/* —— Admin chrome: sticky header + nav —— */
.admin-chrome {
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.14);
}

.admin-header {
  background: linear-gradient(135deg, var(--green-mid) 0%, var(--green-deep) 100%);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
}

.admin-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  flex-shrink: 0;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.admin-header__brand:hover,
.admin-header__brand:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.admin-header__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.admin-header__titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.admin-header__name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.admin-header__badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  background: var(--green-tint);
}

.admin-header__page {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.admin-header__icon-btn,
.admin-header__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-header__icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.admin-header__logout:hover,
.admin-header__icon-btn:hover,
.admin-header__logout:focus-visible,
.admin-header__icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  outline: none;
}

.admin-header__logout span {
  display: none;
}

.admin-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.admin-nav__scroll {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  row-gap: 0.1rem;
  column-gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.15rem 0.75rem;
}

.admin-nav__group {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  flex-shrink: 0;
  padding: 0.35rem 0;
}

.admin-nav__group--end {
  margin-left: auto;
}

.admin-nav__divider {
  flex-shrink: 0;
  align-self: center;
  width: 1px;
  height: 1.5rem;
  margin: 0 0.25rem;
  background: var(--border);
}

.admin-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.admin-nav__link:hover {
  color: var(--green-deep);
  background: #f0faf4;
}

.admin-nav__link:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
}

.admin-nav__link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--green-mid), var(--green-deep));
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.2);
}

.admin-nav__link.active .admin-nav__icon {
  opacity: 1;
}

.admin-nav__icon {
  display: flex;
  flex-shrink: 0;
  opacity: 0.75;
}

.admin-nav__link.active .admin-nav__icon,
.admin-nav__link:hover .admin-nav__icon {
  opacity: 1;
}

.admin-nav__label {
  line-height: 1.2;
}

.notifications-wrap {
  position: relative;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-bell:hover,
.notification-bell[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.22);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #e76f51;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}

.notifications-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 200;
  width: min(20rem, calc(100vw - 2rem));
  max-height: 20rem;
  overflow: auto;
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.notifications-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.notifications-panel-sub {
  font-size: 0.78rem;
  font-weight: 600;
}

.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f3f1;
}

.notification-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: var(--green-deep);
}

.notification-item-body {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.notification-item-time {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #718096;
}

.notification-unread {
  background: #f0faf4;
}

.notifications-empty {
  margin: 0;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.notifications-view-all {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  border-top: 1px solid var(--border);
  background: #f7faf8;
  color: var(--green-mid);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.notifications-view-all:hover {
  background: #edf5f0;
}

main {
  padding: 1.5rem;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.admin-banner {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-banner--error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.modal__dialog--wide {
  max-width: 760px;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.modal__close:hover {
  color: var(--green-deep);
}

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

.checkbox-row input {
  width: auto;
}

.testimonial-quote-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 36rem;
  color: var(--muted);
}

.newsletter-recipients-title {
  margin: 22px 0 10px;
  font-size: 1rem;
  color: var(--green-deep);
}

.newsletter-stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.newsletter-stat {
  flex: 1 1 110px;
  background: var(--surface-soft, #f4f6f5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.newsletter-stat__num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-deep);
}

.newsletter-stat__label {
  font-size: 0.8rem;
  color: var(--muted);
}

.partner-donation-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.partner-donation-section h4 {
  margin: 0 0 0.25rem;
}

.admin-banner--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.agent-layout {
  display: block;
}

.agent-list form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

input,
select,
button {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

button {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
}

button.secondary,
button.btn-secondary {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
}

button.secondary:hover,
button.btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

button.danger {
  background: #c1121f;
  border-color: #c1121f;
}

button.danger:hover {
  background: #9d0208;
  border-color: #9d0208;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  color: var(--green-deep);
  background: #f4faf6;
}

.action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

/* —— Dashboard page —— */
.dashboard-loading {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
}

.dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.dashboard-hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 2px 12px rgba(27, 67, 50, 0.06);
  text-align: left;
}

.dashboard-hero-card--primary {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  border-color: #1b4332;
  color: #fff;
}

.dashboard-hero-card--primary .dashboard-hero-card__label,
.dashboard-hero-card--primary .dashboard-hero-card__meta {
  color: rgba(255, 255, 255, 0.88);
}

.dashboard-hero-card--primary .dashboard-hero-card__value {
  color: #fff;
}

.dashboard-hero-card--link {
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.dashboard-hero-card--link:hover {
  border-color: var(--green-soft);
  background: #f8fcf9;
}

.dashboard-hero-card--highlight {
  border-color: #f59e0b;
  background: #fffbeb;
}

.dashboard-hero-card--highlight .dashboard-hero-card__value {
  color: #b45309;
}

.dashboard-hero-card__label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dashboard-hero-card__value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.2;
}

.dashboard-hero-card__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.dashboard-hero-card__chevron {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-mid);
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(27, 67, 50, 0.04);
}

button.stat-card {
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

button.stat-card:hover {
  background: #f4faf6;
  border-color: var(--green-soft);
  color: var(--text);
}

button.stat-card:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
  box-shadow: 0 2px 8px rgba(27, 67, 50, 0.04), 0 0 0 3px rgba(45, 106, 79, 0.15);
}

.stat-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--green-tint);
  color: var(--green-deep);
}

.stat-card__icon svg {
  display: block;
}

.stat-card__body {
  flex: 1;
  min-width: 0;
}

.stat-card__body span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card strong {
  display: block;
  font-size: 1.15rem;
  margin-top: 0.1rem;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--green-mid);
  line-height: 1.2;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.dashboard-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-card--attention {
  border-color: #e8e0c8;
}

.dashboard-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fcf9 0%, #fff 100%);
}

.dashboard-card__title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--green-deep);
}

.dashboard-card__desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.dashboard-card__badge {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.dashboard-list {
  flex: 1;
  min-height: 120px;
  border: 0;
  border-radius: 0;
}

.dashboard-list table {
  margin: 0;
}

.dashboard-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-card__foot {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  background: #fafcfb;
}

.dashboard-card__foot--split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-attention {
  flex: 1;
  min-height: 100px;
  padding: 0.5rem 0;
}

.dashboard-attention-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-attention-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s ease;
}

.dashboard-attention-item:hover {
  background: #f4faf6;
}

.dashboard-attention-item:last-child {
  border-bottom: 0;
}

.dashboard-attention-item__type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-mid);
}

.dashboard-attention-item__title {
  font-weight: 600;
  color: var(--green-deep);
  font-size: 0.92rem;
}

.dashboard-attention-item__meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard-empty {
  padding: 1.75rem 1rem;
  text-align: center;
}

.dashboard-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-empty--ok {
  background: #f0fdf4;
}

.dashboard-empty--ok p {
  color: #166534;
}

.dashboard-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.dashboard-quick-links__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.25rem;
}

.dashboard-quick-links__btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 999px;
  background: #fff;
  color: var(--green-deep);
  border: 1px solid var(--border);
}

.dashboard-quick-links__btn:hover {
  background: var(--green-tint);
  border-color: #b7d4c4;
  color: var(--green-deep);
}

.donation-status-pill {
  display: inline-flex;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.donation-status-pill--completed {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.donation-status-pill--pending {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.donation-status-pill--other {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

@media (max-width: 900px) {
  .dashboard-hero-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-header__page {
    display: none;
  }
}

@media (min-width: 720px) {
  .admin-header__logout span {
    display: inline;
  }

  .admin-header__logout {
    padding: 0.45rem 0.85rem;
  }
}

@media (max-width: 640px) {
  .dashboard-card__foot--split .btn-sm {
    flex: 1;
    text-align: center;
  }
}

.table-wrap {
  overflow-x: auto;
}

.field-agents-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-outline {
  background: #ffffff;
  color: var(--green-deep);
  border: 1px solid var(--green-mid);
  font-weight: 600;
}

.btn-outline:hover {
  background: #f0faf4;
  border-color: var(--green-deep);
}

.btn-primary {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
}

.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:focus-visible {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  box-shadow: none;
}

.btn-link {
  color: var(--green-mid);
}

.btn-link:hover {
  color: var(--green-deep);
}

.communities-admin-danger,
.communities-admin-danger:hover {
  color: var(--danger);
}

.collapsible-add-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #f4faf6;
}

.collapsible-add-panel__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--green-deep);
}

.field-agent-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.settings-sms-form {
  grid-template-columns: minmax(220px, 360px);
}

.settings-admin-users-table .actions-cell {
  white-space: nowrap;
}

.field-agent-form-actions {
  grid-column: 1 / -1;
}

.agent-list h3 {
  margin-top: 0;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--green-deep);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 67, 50, 0.45);
}

.modal__dialog {
  position: relative;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(27, 67, 50, 0.2);
  border: 1px solid var(--border);
}

.modal__dialog h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--green-deep);
}

.form-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-deep);
}

.form-label input,
.form-label select {
  font-weight: 400;
  color: var(--text);
}

.payment-receipt-file-list {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--green-mist, #f1f7f2);
  border: 1px solid var(--border, #d7e3da);
  border-radius: 10px;
}

.payment-receipt-file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.payment-receipt-file-name {
  font-weight: 600;
  color: var(--green-deep);
  word-break: break-word;
  flex: 1 1 auto;
}

.payment-receipt-file-remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #6b7c70);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.payment-receipt-file-remove:hover {
  background: #fdecec;
  color: #c0392b;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 2.6rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}

.password-toggle:hover {
  color: var(--green-deep);
  background: rgba(45, 106, 79, 0.1);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.3);
}

.password-toggle svg {
  display: block;
}

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  min-width: 36px;
  background: #ffffff;
  color: var(--green-mid);
  border: 1px solid #b7d4c4;
  border-radius: 8px;
}

.icon-btn:hover {
  background: #f0faf4;
  color: var(--green-deep);
}

.icon-btn svg {
  display: block;
}

#agent-edit-form.field-agent-form-grid {
  grid-template-columns: 1fr;
  align-items: stretch;
}

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

/* —— Beneficiaries page —— */
.beneficiaries-page h2 {
  margin: 0 0 0.25rem;
}

.beneficiaries-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.beneficiaries-toolbar__lead {
  margin: 0;
  max-width: 32rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.beneficiaries-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.beneficiaries-search {
  display: block;
  margin: 0;
}

.beneficiaries-search input {
  min-width: min(100%, 16rem);
  width: 16rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.beneficiaries-search input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.beneficiaries-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.beneficiaries-stat {
  flex: 1 1 7rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fcf9;
}

.beneficiaries-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.beneficiaries-stat__value {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-deep);
}

.beneficiaries-stat--pending {
  background: #fffbeb;
  border-color: #fcd34d;
}

.beneficiaries-stat--pending .beneficiaries-stat__value {
  color: #b45309;
}

.beneficiaries-results-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
}

.beneficiaries-add-panel {
  margin-bottom: 1rem;
}

.beneficiaries-add-panel__hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.86rem;
}

.beneficiaries-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce8e0;
}

.beneficiaries-add-form__field {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.beneficiaries-add-form__field--wide {
  flex: 2 1 100%;
}

.beneficiaries-add-form__submit {
  flex: 0 0 auto;
  align-self: flex-end;
}

.beneficiaries-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
}

.beneficiaries-list {
  border: 0;
  border-radius: 0;
}

.beneficiaries-list table {
  margin: 0;
}

.beneficiaries-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.beneficiaries-list .beneficiaries-empty {
  border: 0;
  border-radius: 0;
}

.beneficiaries-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-deep);
  background: var(--green-tint);
  border: 1px solid #b7d4c4;
}

.status-pill--pending {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.beneficiary-list-hint {
  margin: 0 0 12px;
  max-width: 52rem;
}

.beneficiary-modal-subhint {
  margin: 0 0 12px;
}

.modal__dialog--beneficiary {
  max-width: 560px;
}

.beneficiary-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.beneficiary-table tbody tr {
  cursor: pointer;
}

.beneficiary-table tbody tr:hover {
  background: #f4faf6;
}

.beneficiary-table .beneficiary-name-cell {
  font-weight: 600;
  color: var(--green-deep);
}

@media (max-width: 720px) {
  .providers-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .providers-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .providers-search input {
    width: 100%;
  }

  .providers-add-form {
    flex-direction: column;
    align-items: stretch;
  }

  .providers-add-form__submit {
    width: 100%;
  }

  .field-agents-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .field-agents-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .field-agents-search input {
    width: 100%;
  }

  .field-agents-add-form {
    flex-direction: column;
    align-items: stretch;
  }

  .field-agents-add-form__submit {
    width: 100%;
  }

  .donations-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .donations-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .donations-search input {
    width: 100%;
  }

  .donors-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .donors-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .donors-search input {
    width: 100%;
  }

  .requests-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .requests-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .requests-search input {
    width: 100%;
  }

  .requests-add-panel {
    max-width: none;
  }

  .requests-add-form {
    grid-template-columns: 1fr;
  }

  .requests-add-form__field--wide,
  .requests-add-form__fees,
  .requests-add-form__submit {
    grid-column: 1;
  }

  .requests-add-form__fees {
    grid-template-columns: 1fr;
  }

  .requests-add-form__field--check {
    padding-bottom: 0;
  }

  .requests-add-form__submit {
    width: 100%;
    justify-self: stretch;
  }

  .beneficiaries-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .beneficiaries-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .beneficiaries-search input {
    width: 100%;
  }

  .beneficiaries-add-form {
    flex-direction: column;
    align-items: stretch;
  }

  .beneficiaries-add-form__submit {
    width: 100%;
  }
}

.request-table tbody tr {
  cursor: pointer;
}

.request-table tbody tr:hover {
  background: #f4faf6;
}

.request-table .actions-cell {
  cursor: default;
  white-space: nowrap;
  width: 1%;
}

.request-table .actions-cell:hover {
  background: transparent;
}

.request-whatsapp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(50vh, 420px);
  overflow-y: auto;
  margin-bottom: 12px;
}

.request-whatsapp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.request-whatsapp-row__meta {
  min-width: 0;
  flex: 1 1 12rem;
}

.request-whatsapp-row__name {
  font-weight: 600;
  color: var(--green-deep);
}

.request-whatsapp-row__phone {
  font-size: 0.88rem;
  color: var(--muted);
}

.request-whatsapp-row__note {
  font-size: 0.88rem;
  color: var(--muted);
}

.request-whatsapp-payment-link:hover {
  color: var(--green-deep);
  text-decoration: underline;
}

.beneficiary-requests-table tbody tr {
  cursor: pointer;
}

.beneficiary-requests-table tbody tr:hover {
  background: #f4faf6;
}

.btn-table-action {
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.beneficiary-table .actions-cell {
  cursor: default;
  white-space: nowrap;
  width: 1%;
}

.beneficiary-table .actions-cell:hover {
  background: transparent;
}

.beneficiary-table .actions-cell .action-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 12rem;
}

.beneficiary-table .actions-cell .action-row .btn-beneficiary-requests {
  flex: 0 0 9.75rem;
  width: 9.75rem;
  margin-right: auto;
  text-align: center;
  box-sizing: border-box;
}

.beneficiary-table .actions-cell .action-row [data-action="delete-beneficiary"] {
  flex-shrink: 0;
}

/* —— Requests page —— */
.requests-page h2 {
  margin: 0 0 0.25rem;
}

.requests-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.requests-toolbar__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.requests-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.requests-search {
  display: block;
  margin: 0;
}

.requests-search input {
  min-width: min(100%, 18rem);
  width: 18rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.requests-search input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.requests-add-panel {
  margin-bottom: 1rem;
  max-width: 38rem;
}

.requests-add-panel__hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.86rem;
}

.requests-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.75rem 0.85rem;
  align-items: end;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce8e0;
}

.requests-add-form__field {
  min-width: 0;
  margin: 0;
}

.requests-add-form__field input:not([type='checkbox']),
.requests-add-form__field select,
.requests-add-form__field textarea {
  width: 100%;
  box-sizing: border-box;
}

.requests-add-form__field--wide {
  grid-column: 1 / -1;
}

.requests-add-form__field--check {
  align-self: end;
  padding-bottom: 0.55rem;
  white-space: nowrap;
}

.requests-add-form__fees {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.requests-fee-readout {
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #f4faf6;
  border: 1px solid #dce8e0;
}

.requests-fee-readout__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.requests-fee-readout output {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--green-deep);
  font-size: 1rem;
}

.requests-add-form__submit {
  grid-column: 1 / -1;
  justify-self: start;
}

.requests-provider-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fffbeb;
  font-size: 0.9rem;
}

.requests-provider-filter__text strong {
  color: var(--green-deep);
}

.requests-tabs-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(27, 67, 50, 0.04);
}

.requests-results-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
}

.requests-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
}

.requests-list {
  border: 0;
  border-radius: 0;
}

.requests-list table {
  margin: 0;
}

.requests-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.requests-list .requests-empty {
  border: 0;
  border-radius: 0;
}

.request-title-cell {
  font-weight: 600;
  color: var(--green-deep);
}

.request-beneficiary-cell {
  font-weight: 500;
}

.requests-urgent-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #9d0208;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 4px;
  vertical-align: middle;
}

.partner-landing-section {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.partner-landing-section__title {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}

.partner-logo-thumb {
  display: block;
  width: 56px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

.partner-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.partner-logo-preview__img {
  max-width: 160px;
  max-height: 64px;
  object-fit: contain;
}

.partner-tier-pill {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  border: 1px solid transparent;
}

.partner-tier-pill--gold {
  color: #7a5a00;
  background: #fff6db;
  border-color: #f0d480;
}

.partner-tier-pill--silver {
  color: #4b5563;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.partner-tier-pill--bronze {
  color: #7c4a2b;
  background: #f7ece3;
  border-color: #e0c3a8;
}

.requests-featured-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1b5e20;
  background: #edf7ed;
  border: 1px solid #b7dfb9;
  border-radius: 4px;
  vertical-align: middle;
}

/* —— Donors page —— */
.donors-page h2 {
  margin: 0 0 0.25rem;
}

.donors-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.donors-toolbar__lead {
  margin: 0;
  max-width: 34rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.donors-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.donors-search {
  display: block;
  margin: 0;
}

.donors-search input {
  min-width: min(100%, 16rem);
  width: 16rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.donors-search input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.donors-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.donors-stat {
  flex: 1 1 7rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fcf9;
}

.donors-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.donors-stat__value {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-deep);
  line-height: 1.2;
}

.donors-results-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
}

.donors-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
}

.donors-list {
  border: 0;
  border-radius: 0;
}

.donors-list table {
  margin: 0;
}

.donors-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.donors-list .donors-empty {
  border: 0;
  border-radius: 0;
}

.donor-name-cell {
  font-weight: 600;
  color: var(--green-deep);
}

.donor-email-link {
  color: var(--green-mid);
  text-decoration: none;
  word-break: break-all;
}

.donor-email-link:hover {
  color: var(--green-deep);
  text-decoration: underline;
}

.donors-table tbody tr:hover {
  background: #f4faf6;
}

/* —— Donations page —— */
.donations-page h2 {
  margin: 0 0 0.25rem;
}

.donations-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.donations-toolbar__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.donations-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.donations-search {
  display: block;
  margin: 0;
}

.donations-search input {
  min-width: min(100%, 18rem);
  width: 18rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.donations-search input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.donations-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.donations-stat {
  flex: 1 1 7rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fcf9;
}

.donations-stat--highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.donations-stat--highlight .donations-stat__value {
  color: #166534;
}

.donations-stat--pending {
  background: #fffbeb;
  border-color: #fcd34d;
}

.donations-stat--pending .donations-stat__value {
  color: #b45309;
}

.donations-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.donations-stat__value {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-deep);
  line-height: 1.2;
}

.donations-tabs-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(27, 67, 50, 0.04);
}

.donations-status-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fcf9;
  border-bottom: 1px solid var(--border);
}

.donations-status-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.donations-status-tab:hover {
  color: var(--green-mid);
  background: #f4faf6;
}

.donations-status-tab.active {
  color: var(--green-deep);
  background: #fff;
  border-bottom-color: var(--green-mid);
}

.donations-results-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
}

.donations-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
}

.donations-list {
  border: 0;
  border-radius: 0;
}

.donations-list table {
  margin: 0;
}

.donations-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.donations-list .donations-empty {
  border: 0;
  border-radius: 0;
}

.donation-donor-cell,
.donation-beneficiary-cell {
  font-weight: 600;
  color: var(--green-deep);
}

.donation-receipt-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--green-deep);
  background: #f4faf6;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.donation-status-pill--failed {
  color: #9d0208;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.donation-status-pill--refunded {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.donations-table tbody tr:hover {
  background: #f4faf6;
}

.requests-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f4faf6;
  font-size: 0.92rem;
}

.request-status-tabs {
  margin: 0;
  background: #f8fcf9;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.request-status-tab {
  padding: 0.85rem 1.2rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.request-status-tab:hover {
  color: var(--green-mid);
  background: #f8f9fa;
  border-color: transparent;
}

.request-status-tab.active {
  color: var(--green-deep);
  background: #fff;
  border-bottom-color: var(--green-mid);
}

/* —— Providers page —— */
.providers-page h2 {
  margin: 0 0 0.25rem;
}

.providers-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.providers-toolbar__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.providers-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.providers-search input {
  min-width: min(100%, 18rem);
  width: 18rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.providers-search input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.providers-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.providers-stat {
  flex: 1 1 7rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fcf9;
}

.providers-stat--pending {
  background: #fffbeb;
  border-color: #fcd34d;
}

.providers-stat--pending .providers-stat__value {
  color: #b45309;
}

.providers-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.providers-stat__value {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-deep);
}

.providers-tabs-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(27, 67, 50, 0.04);
}

.providers-status-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fcf9;
  border-bottom: 1px solid var(--border);
}

.providers-status-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}

.providers-status-tab:hover {
  color: var(--green-mid);
  background: #f4faf6;
}

.providers-status-tab.active {
  color: var(--green-deep);
  background: #fff;
  border-bottom-color: var(--green-mid);
}

.providers-results-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
}

.providers-add-panel {
  margin-bottom: 1rem;
}

.providers-add-panel__hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.86rem;
}

.providers-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce8e0;
}

.providers-add-form__field {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.providers-add-form__field--wide {
  flex: 2 1 100%;
}

.providers-add-form__submit {
  flex: 0 0 auto;
  align-self: flex-end;
}

.providers-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
}

.providers-list {
  border: 0;
}

.providers-list table {
  margin: 0;
}

.providers-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.provider-name-cell {
  font-weight: 600;
  color: var(--green-deep);
}

.provider-email-muted {
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

.provider-table tbody tr:hover {
  background: #f4faf6;
}

.provider-table .actions-cell {
  cursor: default;
  white-space: nowrap;
  width: 1%;
}

.provider-table .actions-cell .action-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

/* —— Field agents page —— */
.field-agents-page h2 {
  margin: 0 0 0.25rem;
}

.field-agents-toolbar__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.field-agents-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.field-agents-search {
  display: block;
  margin: 0;
}

.field-agents-search input {
  min-width: min(100%, 18rem);
  width: 18rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.field-agents-search input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.field-agents-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.field-agents-stat {
  flex: 1 1 7rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fcf9;
}

.field-agents-stat--unverified {
  background: #fffbeb;
  border-color: #fcd34d;
}

.field-agents-stat--unverified .field-agents-stat__value {
  color: #b45309;
}

.field-agents-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.field-agents-stat__value {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-deep);
  line-height: 1.2;
}

.field-agents-tabs-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 6px rgba(27, 67, 50, 0.04);
}

.field-agents-status-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fcf9;
  border-bottom: 1px solid var(--border);
}

.field-agents-status-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}

.field-agents-status-tab:hover {
  color: var(--green-mid);
  background: #f4faf6;
}

.field-agents-status-tab.active {
  color: var(--green-deep);
  background: #fff;
  border-bottom-color: var(--green-mid);
}

.field-agents-results-hint {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
}

.field-agents-add-panel {
  margin-bottom: 1rem;
}

.field-agents-add-panel__hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.86rem;
}

.field-agents-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce8e0;
}

.field-agents-add-form__field {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.field-agents-add-form__field--wide {
  flex: 2 1 100%;
}

.field-agents-add-form__submit {
  flex: 0 0 auto;
  align-self: flex-end;
}

.field-agents-list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
}

.field-agents-list {
  border: 0;
}

.field-agents-list table {
  margin: 0;
}

.field-agents-list th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-agent-name-cell {
  font-weight: 600;
  color: var(--green-deep);
}

.field-agent-id-cell {
  font-size: 0.88rem;
}

.field-agent-email-link {
  color: var(--green-mid);
  text-decoration: none;
  word-break: break-all;
}

.field-agent-email-link:hover {
  color: var(--green-deep);
  text-decoration: underline;
}

.field-agent-table tbody tr:hover {
  background: #f4faf6;
}

.field-agent-table .actions-cell {
  cursor: default;
  white-space: nowrap;
  width: 1%;
}

.field-agent-table .actions-cell .action-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.form-label textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  width: 100%;
}

.settings-sms-alerts-hint {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* —— Settings page —— */
.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.settings-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-deep);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.settings-nav__link:hover {
  background: var(--green-tint);
  border-color: #b7d4c4;
  color: var(--green-deep);
}

.settings-nav__link:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.settings-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.04);
  scroll-margin-top: 0.75rem;
  overflow: hidden;
}

.settings-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f6fbf8 0%, #fff 100%);
}

.settings-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--green-deep);
}

.settings-card__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 36rem;
}

.settings-card__count {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-deep);
  background: var(--green-tint);
  border: 1px solid #b7d4c4;
  white-space: nowrap;
}

.settings-card__body {
  padding: 1rem 1.15rem 1.15rem;
}

.settings-card__body > .admin-banner:last-of-type {
  margin-bottom: 0.85rem;
}

.settings-subsection {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--border);
}

.settings-subsection__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--green-deep);
}

.settings-subsection__hint {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fcf9;
  max-width: 40rem;
}

.settings-toggle[data-enabled='false'] {
  background: #fafafa;
  border-color: #e5e7eb;
}

.settings-toggle__control {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  cursor: pointer;
}

.settings-toggle__control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-toggle__track {
  position: relative;
  display: block;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}

.settings-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.settings-toggle__control input:checked + .settings-toggle__track {
  background: var(--green-mid);
}

.settings-toggle__control input:checked + .settings-toggle__track::after {
  transform: translateX(18px);
}

.settings-toggle__control input:focus-visible + .settings-toggle__track {
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.25);
}

.settings-toggle__text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--green-deep);
  margin-bottom: 0.15rem;
}

.settings-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: #f4faf6;
  border: 1px solid #dce8e0;
}

.settings-add-form--single {
  max-width: 32rem;
}

.settings-add-form__field {
  flex: 1 1 140px;
  min-width: 0;
  margin: 0;
}

.settings-add-form__field--grow {
  flex: 2 1 200px;
}

.settings-add-form__submit {
  flex: 0 0 auto;
  align-self: flex-end;
  white-space: nowrap;
}

.settings-fee-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: 28rem;
}

.settings-fee-form__field {
  flex: 1 1 10rem;
  margin: 0;
}

.settings-input-addon {
  display: flex;
  align-items: stretch;
}

.settings-input-addon input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}

.settings-input-addon__suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: #f4faf6;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.settings-fee-preview {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #f4faf6;
  border: 1px solid #dce8e0;
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 36rem;
}

.settings-fee-preview:empty {
  display: none;
}

.settings-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.settings-list .settings-empty {
  border: 0;
  border-radius: 0;
}

.settings-list table {
  margin: 0;
}

.settings-list th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-list td {
  vertical-align: middle;
}

.settings-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  background: #fafcfb;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.settings-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-pill--active {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.status-pill--inactive {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.settings-table .actions-cell {
  white-space: nowrap;
}

.settings-table .action-row {
  justify-content: flex-end;
}

button.btn-sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  border-radius: 6px;
}

.settings-phone {
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  color: var(--green-deep);
  background: #f4faf6;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.settings-you-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green-deep);
  background: var(--green-tint);
  border-radius: 4px;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .settings-add-form {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-add-form__submit,
  .settings-fee-form .btn-primary {
    width: 100%;
  }

  .settings-fee-form {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .settings-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.65rem;
  }

  .settings-nav__link {
    flex-shrink: 0;
  }
}

.form-label--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-label--checkbox input {
  width: auto;
  margin: 0;
}

/* Organization wallet */
.org-wallet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.org-wallet-toolbar__intro h2 {
  margin: 0 0 4px;
  color: var(--green-deep);
}

.org-wallet-toolbar__lead {
  margin: 0;
  max-width: 56ch;
}

.org-wallet-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.org-wallet-search input {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  min-width: 240px;
  font-size: 0.92rem;
  background: #fff;
}

.org-wallet-search input:focus {
  outline: 2px solid var(--green-mid);
  outline-offset: 1px;
}

.org-wallet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.org-wallet-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

.org-wallet-stat--primary {
  background: linear-gradient(135deg, var(--green-mid) 0%, var(--green-deep) 100%);
  border-color: transparent;
}

.org-wallet-stat__label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.org-wallet-stat--primary .org-wallet-stat__label {
  color: rgba(255, 255, 255, 0.85);
}

.org-wallet-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-deep);
}

.org-wallet-stat--primary .org-wallet-stat__value {
  color: #fff;
}

.org-wallet-list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.org-wallet-source {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--green-tint);
  color: var(--green-deep);
}

.org-wallet-source--platform_support {
  background: #e7f0ff;
  color: #1d4ed8;
}

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

.org-wallet-amount--credit {
  color: var(--green-mid);
}

.org-wallet-amount--debit {
  color: var(--danger);
}

@media (max-width: 640px) {
  .org-wallet-search input {
    min-width: 0;
    width: 100%;
  }
  .org-wallet-toolbar__actions {
    width: 100%;
  }
}

/* Communities (admin) */
.communities-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.communities-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.communities-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 14px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.communities-tab:hover {
  background: none;
  color: var(--green-deep);
}

.communities-tab.active {
  color: var(--green-deep);
  border-bottom-color: var(--green-mid);
}

.communities-stories-tab {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.communities-stories-tab__select {
  max-width: 360px;
}

.communities-stories-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.communities-admin-section--flush {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.communities-admin-story__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.communities-add-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.communities-add-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.communities-add-form__wide {
  grid-column: 1 / -1;
}

.communities-admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.communities-detail-card[hidden] {
  display: none;
}

.communities-list-card,
.communities-detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.communities-detail-card {
  padding: 16px;
  min-height: 280px;
}

.communities-admin-row--active {
  background: var(--green-tint);
}

.communities-admin-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.communities-admin-detail__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.communities-admin-danger {
  color: var(--danger);
}

.communities-admin-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
}

.communities-admin-edit-form__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.communities-admin-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.communities-admin-section h4 {
  margin: 0 0 10px;
  color: var(--green-deep);
}

.communities-admin-members {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.communities-admin-members li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
}

.communities-admin-inline-form,
.communities-admin-stack-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.communities-admin-stack-form {
  flex-direction: column;
  align-items: stretch;
}

.communities-admin-story {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--border);
}

.communities-admin-story p {
  margin: 6px 0;
  white-space: pre-wrap;
}

/* Full-page community detail */
.community-detail-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.community-detail-back {
  align-self: flex-start;
  padding: 4px 0;
  font-weight: 600;
}

.community-detail-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.community-detail-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.community-detail-page__title {
  margin: 0 0 4px;
  color: var(--green-deep);
}

.community-detail-page__card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.community-detail-page__card-title {
  margin: 0 0 12px;
  color: var(--green-deep);
  font-size: 1.05rem;
}

.community-detail-page__card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.community-detail-page__card-head .community-detail-page__card-title {
  margin: 0;
}

.community-detail-edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.community-detail-edit-form__wide {
  grid-column: 1 / -1;
}

.community-detail-edit-form__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
}

.community-members-table {
  width: 100%;
}

.community-members-table__action {
  text-align: right;
  white-space: nowrap;
}

.community-members-table__empty {
  text-align: center;
  padding: 18px 0;
}

/* Community stories tab */
.communities-stories-tab__bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.community-stories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.community-story-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.community-story-card:hover,
.community-story-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(27, 67, 50, 0.12);
  outline: none;
}

.community-story-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.community-story-card__status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.community-story-card__status--published {
  background: var(--green-tint);
  color: var(--green-deep);
}

.community-story-card__status--draft {
  background: #fdf0d5;
  color: #92600a;
}

.community-story-card__title {
  margin: 0;
  font-size: 1rem;
  color: var(--green-deep);
}

.community-story-card__subtitle {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft, #4b5563);
}

.community-story-card__community {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green);
}

.community-story-card__preview {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
  flex: 1;
}

.community-story-card__edit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
}

/* Story editor (full page) */
.community-story-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.community-story-editor__head h2 {
  margin: 0 0 4px;
  color: var(--green-deep);
}

.community-story-editor__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.community-story-editor__actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.community-story-editor__status {
  margin-left: auto;
  min-width: 160px;
}

/* Rich text editor */
.rte {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.rte__resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid var(--green);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: nwse-resize;
  z-index: 15;
  touch-action: none;
}

.rte__remove-handle {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: var(--danger, #c0392b);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  z-index: 16;
}

.rte__remove-handle:hover {
  background: #a93226;
}

.rte__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--cream, #faf7f0);
  border-bottom: 1px solid var(--border);
}

.rte__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink, #1f2937);
  font-size: 0.95rem;
  cursor: pointer;
}

.rte__btn:hover {
  background: #fff;
  border-color: var(--border);
}

.rte__sep {
  width: 1px;
  align-self: stretch;
  margin: 4px 4px;
  background: var(--border);
}

.rte__group {
  display: inline-flex;
  gap: 2px;
}

.rte__emoji {
  position: relative;
  display: inline-flex;
}

.rte__emoji-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  width: 240px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.rte__emoji-btn {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

.rte__emoji-btn:hover {
  background: var(--green-tint);
}

.rte__editor {
  min-height: 280px;
  padding: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  overflow-wrap: anywhere;
}

.rte__editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted, #9ca3af);
}

.rte__editor::after {
  content: "";
  display: block;
  clear: both;
}

.rte__editor img {
  max-width: 100%;
  border-radius: 8px;
}

.rte-img {
  cursor: pointer;
}

.rte-img.is-selected {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.rte__hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
}

.rte--compact .rte__toolbar {
  padding: 6px 8px;
}

.rte--compact .rte__btn {
  min-width: 30px;
  height: 30px;
}

.rte--compact .rte__editor {
  min-height: 88px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .community-stories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .community-stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .community-stories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .communities-admin-layout,
  .communities-add-form,
  .community-detail-edit-form {
    grid-template-columns: 1fr;
  }
}

.admin-site-footer {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border, #e2e8e4);
  background: #f8faf9;
}

.admin-site-footer .site-footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #5c5c5c;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.admin-site-footer .site-footer-version {
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}
