/* Giving pages (2026-09-30): My Giving, the pastors' and finance lookup, and the finance list. Phone first. */
:root { --panel: var(--surface, #fff); --ink: var(--navy); --muted-text: var(--slate); --hairline: var(--line); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: var(--bg, #f7f8f6); color: var(--ink, #061d2d);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
main { max-width: 640px; margin: 0 auto; padding: 20px 18px 80px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm, 13px); font-weight: 600; min-height: 44px;
  color: var(--muted-text); text-decoration: none; padding: 8px 0; margin-bottom: 2px;
}
.back:hover { color: var(--ink); }
h1 { font-size: var(--text-xl, 24px); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.intro { font-size: var(--text-base, 15px); color: var(--muted-text); margin-top: 6px; line-height: 1.5; }
.state { margin-top: 18px; color: var(--muted-text); font-size: 1rem; line-height: 1.5; }
.state.err { color: var(--coral-dark); background: var(--coral-light, #fdecea); border: 1px solid var(--coral-dark);
  border-radius: 12px; padding: 14px 16px; font-weight: 600; }
.panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: 14px; padding: 16px; margin-top: 16px; }
.field-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 4px; }
select, input[type="search"], input[type="email"] {
  font: inherit; font-size: 1rem; padding: 10px 12px; min-height: 44px; width: 100%; max-width: 100%;
  border: 1.5px solid var(--line-strong, #c9cfcc); border-radius: 10px; background: var(--panel); color: var(--ink);
}
.year-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.year-row select { width: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
  border-radius: 10px; font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer; text-decoration: none;
  color: var(--ink); background: var(--panel); border: 1.5px solid var(--line-strong, #c9cfcc);
}
.btn.primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.btn[disabled] { opacity: .6; cursor: default; }
.results { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.results button { width: 100%; text-align: left; justify-content: flex-start; }
.msg { margin-top: 10px; font-weight: 600; font-size: .9375rem; }
.msg.err { color: var(--coral-dark); }
.msg.ok { color: var(--sage-dark, #2f5d46); }
.people-list { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.person-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; }
.person-name { font-weight: 650; overflow-wrap: break-word; }
.person-email { font-size: .875rem; color: var(--muted-text); overflow-wrap: anywhere; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.add-row input { flex: 1 1 220px; width: auto; }

/* The view itself (view.js). */
.g-household { margin-top: 14px; font-size: .9375rem; overflow-wrap: break-word; }
.g-label { font-weight: 700; }
.g-total { margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--hairline); }
.g-total-label { font-size: .875rem; font-weight: 700; color: var(--muted-text); }
.g-total-value { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.g-total-count { font-size: .9375rem; color: var(--muted-text); margin-top: 2px; }
.g-warn { margin-top: 10px; font-size: .9375rem; font-weight: 600; color: var(--coral-dark); }
.g-quiet { margin-top: 14px; color: var(--muted-text); font-size: 1rem; }
.g-h2 { font-size: 1rem; font-weight: 700; margin-top: 20px; }
.g-funds, .g-gifts { list-style: none; margin-top: 8px; border-top: 1px solid var(--hairline); }
.g-fund, .g-gift { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.g-fund { display: flex; justify-content: space-between; gap: 12px; }
.g-fund-name { overflow-wrap: break-word; }
.g-fund-amt, .g-gift-amt { font-weight: 700; white-space: nowrap; }
.g-gift-row { display: flex; justify-content: space-between; gap: 12px; }
.g-gift-date { font-weight: 600; }
.g-gift-meta { font-size: .875rem; color: var(--muted-text); margin-top: 2px; overflow-wrap: break-word; }
.g-foot { margin-top: 20px; font-size: .875rem; color: var(--muted-text); line-height: 1.5; }

@media (max-width: 560px) { main { padding: 16px 16px 72px; } h1 { font-size: 1.5rem; } }
.add-row .field-label { flex: 1 1 100%; margin-bottom: 0; }
