/* Church dashboard (/admin). Builds on app.css. */
.admin-header { background: var(--brand); color: #fff; }
.admin-bar { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.admin-brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; margin-right: auto; }
.admin-brand span { opacity: .7; font-weight: 400; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.admin-bar nav a, .admin-bar .linklike { color: #fff; opacity: .85; text-decoration: none; font-size: .95rem; padding: 4px 0; }
.admin-bar nav a.active { opacity: 1; border-bottom: 2px solid #fff; }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.small { font-size: .85rem; }
.flush { margin-top: 0; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.inline { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; text-decoration: underline; }
.linklike.danger, .danger { color: var(--error); }
.btn-danger { background: #fff; color: var(--error); border: 1px solid #f1c4c4; }
.btn-danger:hover { background: #fdf0f0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.page-head h1 { margin: 0 0 12px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { text-decoration: none; color: inherit; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .stat-row { gap: 8px; } .stat { padding: 14px 12px; } .stat-num { font-size: 1.5rem; } .stat .muted { font-size: .8rem; line-height: 1.3; } }
a.bar-row { color: inherit; text-decoration: none; }
a.bar-row:hover span:first-child { text-decoration: underline; }
.bar-row.is-top .bar > span { background: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; }
.filters input, .filters select { width: auto; flex: 1 1 160px; margin: 0; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.pill-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: #eef2f6; white-space: nowrap; }
.s-new { background: #fff4d6; color: #7a5300; }
.s-contacted { background: #e2efff; color: #1d4f91; }
.s-serving { background: #dff5e5; color: #1d6b35; }
.s-not_now { background: #eef2f6; color: #4b5563; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; }
.bulk-actions select { width: auto; margin: 0; }
.bulk-actions .btn, .filters .btn { padding: 10px 16px; }
.danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.chip { margin: 0; font-weight: 400; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: .9rem; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rename-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; margin-top: 10px; }
.team-edit summary { cursor: pointer; list-style: none; }
.team-edit summary::-webkit-details-marker { display: none; }
.team-edit[open] summary { margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
input[type=color] { width: 100%; height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.resend { margin-top: 14px; }
.follow-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 14px 18px; }
.follow-row a.pill-status { text-decoration: none; }
.follow-row .muted { margin-left: auto; }
.bar-row.wide-label { grid-template-columns: 13em 1fr 2.2em; }
@media (max-width: 420px) { .bar-row.wide-label { grid-template-columns: 9.5em 1fr 2em; } }
.logo-field { margin-bottom: 14px; }
.logo-preview { border-radius: 10px; padding: 16px; text-align: center; margin-bottom: 10px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.logo-preview img { max-height: 56px; max-width: 220px; }
.logo-preview .wordmark { color: #fff; font-weight: 700; font-size: 1.1rem; }
.btn-sample { color: #fff; padding: 8px 16px; font-size: .9rem; cursor: default; }
input[type=file] { display: block; margin-top: 6px; font: inherit; font-weight: 400; }
.gift-map table { margin-top: 10px; } .gift-map summary { cursor: pointer; }
.right { text-align: right; }
.role-form select { width: auto; margin: 0; padding: 6px 30px 6px 10px; font-size: .9rem; }
.staff-table td { vertical-align: middle; }
table.roles td:not(:first-child), table.roles th:not(:first-child) { text-align: center; width: 70px; }
.row-inline { display: flex; gap: 8px; }
.row-inline input { margin: 0; }
.row-inline .btn { padding: 10px 16px; }
.gift-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 6px 18px; margin-bottom: 8px; }
.gift-row { display: grid; grid-template-columns: 10.5em 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.gift-row .gift-on { margin: 0; }
.gift-row input[name^=rename_] { margin: 0; padding: 8px 10px; font-size: .92rem; }
.gift-row.is-off .gift-on span { color: var(--muted); text-decoration: line-through; }
.gift-row.is-off input[name^=rename_] { opacity: .5; }
.gift-plain { padding-left: 4px; color: var(--muted); font-size: .95rem; }
@media (max-width: 480px) { .gift-row { grid-template-columns: 1fr; gap: 4px; } }
#sign-rows.group-off { opacity: .45; pointer-events: none; }

/* Public demo */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pco-frame { border: 1px solid #d5dbe3; border-radius: 12px; overflow: hidden; margin: 12px 0; background: #fff; font-size: .95rem; }
.pco-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; background: #b3c5ec; padding: 10px 16px; color: #1f2933; }
.pco-top strong { font-size: 1.1rem; margin-right: 18px; }
.pco-top span.on { background: rgba(255,255,255,.65); border-radius: 999px; padding: 4px 14px; }
.pco-body { display: grid; grid-template-columns: 220px 1fr; }
.pco-side { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.pco-side span { padding: 9px 12px; border-radius: 6px; color: #1f2933; }
.pco-side span.on { background: #e6f1fc; font-weight: 700; }
.pco-side-head { margin: 14px 12px 4px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: #4b5563; }
.pco-main { padding: 14px 0 16px 8px; min-width: 0; }
.pco-main h3 { font-weight: 400; font-size: 1.3rem; margin: 6px 0 20px; color: #1f2933; }
.pco-panel { border: 1px solid #dfe3e8; border-right: 0; border-radius: 6px 0 0 6px; }
.pco-field { padding: 16px 20px; border-top: 1px solid #dfe3e8; color: #6b7280; line-height: 1.7; }
.pco-field:first-child { border-top: 0; }
.pco-field h4 { margin: 0 0 6px; font-size: 1rem; color: #6b7280; font-weight: 600; }
.pco-checks { list-style: none; margin: 0; padding: 0; }
.pco-checks li::before { content: "✓"; margin-right: 10px; font-size: .85em; }
@media (max-width: 640px) { .pco-body { grid-template-columns: 1fr; } .pco-side { flex-direction: row; flex-wrap: wrap; border-bottom: 1px solid #dfe3e8; } .pco-side-head { width: 100%; margin: 6px 12px 0; } .pco-main { padding-left: 12px; } }
.email-preview iframe { width: 100%; height: 2400px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.demo-tips ul { margin: 0 0 12px; padding-left: 1.2em; } .demo-tips li { margin-bottom: 6px; }

/* Billing */
.status-tag { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 0.85em; font-weight: 600; }
.status-ok { background: #e3f4e8; color: #1d6b37; }
.status-warn { background: #fdeaea; color: #a12b2b; }
.notice.warn { background: #fdeaea; border-color: #f2c4c4; }
.billing-plans .plan { padding: 20px 16px; }
.billing-plans .plan .btn { margin-top: 10px; }
.plan-line { font-size: 1.05em; }

/* Our payment page */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 360px); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: minmax(0, 1fr); } }
.checkout-card { max-width: 560px; margin: 0; }
.checkout-benefits { margin: 0; }
.checkout-benefits h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.benefit-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.benefit-list li { position: relative; padding-left: 1.6rem; margin-bottom: .7rem; line-height: 1.45; }
.benefit-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #1b7a43; font-weight: 700; }
.addon-box { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; cursor: pointer; }
.addon-box input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: none; }
.addon-box > span { display: flex; flex-direction: column; gap: .2rem; }
.checkout-plan { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.checkout-plan p { margin: 0; }
.checkout-name { font-weight: 700; font-size: 1.1rem; }
.checkout-lines { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1rem 0; padding: .5rem 0; }
.checkout-line { display: flex; justify-content: space-between; padding: .35rem 0; }
.checkout-discount { color: #1b7a43; }
.checkout-total { font-weight: 700; font-size: 1.1rem; }
.promo-row { margin-bottom: 1rem; }
.promo-row label { display: block; font-weight: 600; margin-bottom: .35rem; }
.promo-input { display: flex; gap: .5rem; }
.promo-input input { flex: 1; min-width: 0; text-transform: uppercase; }
.checkout-section { font-size: 1.05rem; margin: 1.25rem 0 .75rem; }
#payment-element { min-height: 90px; margin-bottom: 1rem; }
#pay-submit { margin-top: .5rem; }
.checkout-terms { margin-top: 1rem; }
.checkout-secure { margin-top: .25rem; }
.checkout-line[hidden], #pay-error[hidden] { display: none; }

/* Color settings: make the colors obviously clickable */
.color-help { margin: .5rem 0 .25rem; }
.color-field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.color-label { font-weight: 600; }
.color-control { display: flex; align-items: center; gap: .5rem; }
.color-swatch { position: relative; width: 56px; height: 44px; flex: none; margin: 0; cursor: pointer; }
.color-swatch input[type=color] { width: 56px; height: 44px; padding: 2px; cursor: pointer; }
.color-hex { width: 7.5rem; flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: lowercase; }
.color-pick { white-space: nowrap; }
.color-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.color-chip { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.color-chip:hover, .color-chip:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.color-control input.color-hex { width: 7.5rem; flex: 0 0 7.5rem; margin: 0; }
.color-control .color-pick { flex: none; margin: 0; }
.color-field { min-width: 0; }

/* Logo upload button */
.logo-upload { margin: 1.25rem 0 1.5rem; }
.logo-upload-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .5rem 0 .25rem; }
.logo-upload .logo-btn { margin: 0; cursor: pointer; }
.logo-upload #logo-input:focus-visible + .hint, .logo-btn:focus-within { outline: 2px solid var(--accent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

/* Teams: a down arrow on the right of each section shows it opens */
.team-edit > summary, .gift-map > summary { position: relative; padding-right: 2.75rem; cursor: pointer; list-style: none; }
.team-edit > summary::-webkit-details-marker, .gift-map > summary::-webkit-details-marker { display: none; }
.team-edit > summary::after, .gift-map > summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%; width: .6rem; height: .6rem;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .15s ease;
}
.team-edit[open] > summary::after, .gift-map[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.team-edit > summary:hover::after, .gift-map > summary:hover::after { border-color: var(--accent); }

/* On-site billing management */
.card-line { margin: .75rem 0; }
.billing-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: .75rem 0; }
.billing-actions form { margin: 0; }
.invoice-table { width: 100%; }
.invoice-table td.right { text-align: right; }

/* Our own confirm box (replaces the browser pop-up) */
.confirm-box { border: 0; border-radius: 14px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(15, 23, 42, .25); color: inherit; }
.confirm-box::backdrop { background: rgba(15, 23, 42, .45); }
.confirm-title { margin: 0 0 8px; font-size: 1.2rem; color: var(--brand); }
.confirm-text { margin: 0 0 20px; line-height: 1.5; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.btn-danger-solid { background: var(--error); color: #fff; border: 1px solid var(--error); }
.btn-danger-solid:hover { filter: brightness(.92); }

/* Header: logo only, name only, or both */
.logo-preview { gap: 12px; }
.logo-preview [hidden] { display: none !important; }
.header-display { border: 0; padding: 0; margin: 4px 0 18px; }
.header-display legend { margin-bottom: 6px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
label.choice { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; background: #fff; margin: 0; font-weight: 500; }
label.choice input { margin: 0; }
label.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.header-display [hidden] { display: none !important; }

/* Settings: Preview and Save side by side in the page header */
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-outline { border: 2px solid #203a5f; }

/* Settings: more room between sections, Save at the very bottom. */
.settings-form .card, .settings-card { margin-bottom: 32px; }
.settings-save { margin: 8px 0 24px; }

/* Custom domain connection */
.domain-form { margin-top: .75rem; max-width: 460px; }
.domain-form input { width: 100%; margin: .25rem 0 .5rem; }
.domain-step { margin: 1.25rem 0 .5rem; font-size: 1rem; }
.dns-record { border: 1px solid var(--line, #d9dee6); border-radius: 10px; padding: .25rem .9rem; margin: .5rem 0; background: #fafbfc; }
.dns-record > div { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: .5rem 0; border-bottom: 1px solid #eceff3; }
.dns-record > div:last-child { border-bottom: 0; }
.dns-label { flex: 0 0 90px; color: #5b6676; font-size: .9em; }
.dns-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; font-weight: 600; flex: 1 1 200px; min-width: 0; }
.status-wait { background: #fff4de; color: #8a5a00; }
.domain-more { margin: .75rem 0; }
.domain-more summary { cursor: pointer; font-weight: 600; }
.dns-record > div { align-items: center; }
.copy-btn { margin-left: auto; padding: 4px 12px; border: 1px solid #c9d0db; border-radius: 8px; background: #fff; color: #203a5f; font: inherit; font-size: .85em; font-weight: 600; cursor: pointer; }
.copy-btn:hover { background: #f1f4f8; }
.dns-help { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 14px; padding: 1.25rem 1.5rem; box-shadow: 0 20px 60px rgba(15, 30, 55, .35); }
.dns-help::backdrop { background: rgba(15, 30, 55, .45); }
.dns-help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dns-help-head h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.dns-help-close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #5b6676; }
.dns-help select { width: 100%; margin: .25rem 0 1rem; }
.dns-steps { padding-left: 1.25rem; margin: 0 0 1rem; }
.dns-steps li { margin: .55rem 0; }
.dns-steps strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f4f8; padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.where-note { background: #f4f7fb; border-left: 4px solid #203a5f; border-radius: 6px; padding: .6rem .9rem; margin: .5rem 0 1rem; }
.dns-help .btn { margin-left: .25rem; }
