/* Care & prayer — module styles. Uses the core design tokens (app.css). Mobile-first. */

/* Dashboard widget */
.care-widget-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.care-widget-stats a { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r); color: var(--ink); background: var(--surface-2); text-decoration: none; }
.care-widget-stats a:hover { border-color: var(--primary); }
.care-widget-stats strong { font-size: 22px; line-height: 1.1; }
.care-widget-stats span { font-size: 12px; color: var(--muted); }

/* Request rows (admin) */
.care-req-list { list-style: none; margin: 0; padding: 0; }
.care-req { display: flex; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); align-items: flex-start; }
.care-req:first-child { border-top: 0; }
.care-req .care-req-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); flex-shrink: 0; }
.care-req-main { flex: 1; min-width: 0; }
.care-req-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.care-req-head strong { font-size: 14px; }
.care-req-text { margin: 4px 0 6px; color: var(--ink-2); white-space: pre-wrap; word-wrap: break-word; }
.care-req-text.masked { color: var(--muted); font-style: italic; }
.care-req-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); align-items: center; }
.care-req .check-col { padding-top: 8px; }
.care-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--warning); }

/* Prayer wall (member + public) */
.pw-wrap { max-width: 720px; margin: 0 auto; }
.pw-hero { text-align: center; padding: 8px 0 14px; }
.pw-hero h1 { font-size: 24px; margin-bottom: 4px; }
.pw-hero p { color: var(--muted); margin: 0; }
.pw-seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 999px; margin: 12px 0 16px; overflow-x: auto; }
.pw-seg a { flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 600; white-space: nowrap; text-decoration: none; min-height: 40px; }
.pw-seg a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.pw-grid { display: grid; gap: 12px; }
.pw-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); scroll-margin-top: 80px; }
.pw-card.answered { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4, var(--surface) 60%); }
.pw-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pw-card-head .pw-cat { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--primary-ink); background: var(--primary-soft); padding: 2px 8px; border-radius: 999px; }
.pw-card-who { font-weight: 600; }
.pw-card-when { font-size: 12px; color: var(--muted); margin-left: auto; }
.pw-card-text { white-space: pre-wrap; word-wrap: break-word; color: var(--ink-2); margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.pw-testimony { border-left: 3px solid #22c55e; padding: 6px 10px; background: #f0fdf4; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 12px; font-size: 14px; }
.pw-card-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pw-count { font-size: 13px; color: var(--muted); }
.pw-pray-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; color: var(--ink); cursor: pointer; font: inherit; }
.pw-pray-btn:hover { border-color: #f43f5e; color: #be123c; }
.pw-pray-btn.done { background: #fff1f2; border-color: #fda4af; color: #be123c; }
.pw-pray-btn .icon { color: #f43f5e; }
.pw-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.pw-form .field { margin-bottom: 14px; }
.pw-form textarea.input { min-height: 120px; font-size: 16px; }
.pw-form .input { font-size: 16px; min-height: 44px; }
.pw-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pw-cats label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-size: 14px; min-height: 44px; }
.pw-cats input { accent-color: var(--primary); }
.pw-cats label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pw-options { display: grid; gap: 8px; margin: 6px 0 14px; }
.pw-submit { width: 100%; min-height: 48px; font-size: 16px; justify-content: center; }
.pw-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.pw-empty { text-align: center; padding: 28px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }
.pw-pager { display: flex; justify-content: space-between; margin-top: 14px; gap: 8px; }

/* Member app generic */
.m-stack > * + * { margin-top: 12px; }
.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; }
.m-card h2 { font-size: 17px; margin-bottom: 6px; }
.m-sub { color: var(--muted); font-size: 13px; }
.m-list { list-style: none; margin: 0; padding: 0; }
.m-list > li { padding: 12px 0; border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.m-list > li:first-child { border-top: 0; padding-top: 0; }
.m-date { width: 52px; flex-shrink: 0; text-align: center; border-radius: var(--r); background: var(--primary-soft); color: var(--primary-ink); padding: 6px 0; line-height: 1.1; }
.m-date b { display: block; font-size: 20px; }
.m-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.m-btn-block { display: flex; width: 100%; justify-content: center; min-height: 46px; }
.m-home-card .pw-card { padding: 12px; box-shadow: none; }
.m-home-card .pw-card-text { font-size: 14px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Booking slots */
.slot-days { display: grid; gap: 14px; }
.slot-day h3 { font-size: 14px; margin: 0 0 8px; color: var(--ink-2); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot-grid label { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--border-strong); border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: 14px; background: var(--surface); }
.slot-grid input { position: absolute; opacity: 0; pointer-events: none; }
.slot-grid label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot-grid label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.pastor-pick { display: grid; gap: 8px; }
.pastor-pick a { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; background: var(--surface); }
.pastor-pick a.active, .pastor-pick a:hover { border-color: var(--primary); background: var(--primary-soft); }

/* Appointments calendar (admin) */
.cal { width: 100%; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { font-size: 12px; color: var(--muted); text-align: center; padding: 6px 0; font-weight: 600; }
.cal-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-day { min-height: 96px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; font-size: 12px; min-width: 0; }
.cal-day.out { background: var(--surface-2); color: var(--faint); }
.cal-day.today { background: #fffbeb; }
.cal-day-num { font-weight: 600; display: flex; justify-content: space-between; }
.cal-appt { display: block; margin-top: 3px; padding: 2px 5px; border-radius: 4px; background: var(--primary-soft); color: var(--primary-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-appt.requested { background: var(--warning-soft); color: var(--warning); }
.cal-appt.done { background: var(--success-soft); color: var(--success); }
.cal-appt.cancelled { background: var(--surface-3); color: var(--faint); text-decoration: line-through; }
.agenda-day { padding: 10px 18px 4px; font-weight: 700; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-top: 1px solid var(--border); }
.agenda-day.is-today { color: var(--primary-ink); }
@media (max-width: 700px) {
  .cal-head { display: none; }
  .cal-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; }
  .cal-day.out, .cal-day.empty-day { display: none; }
}

/* Pathways */
.pw-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.pw-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.pw-step-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); }
.pw-steps li.done .pw-step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.pw-steps li.done .pw-step-title { color: var(--ink); }
.pw-step-title { color: var(--ink-2); }
.path-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.path-card { display: flex; flex-direction: column; }
.path-card .card-body { flex: 1; }
.path-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; text-align: center; }
.path-nums div { background: var(--surface-2); border-radius: var(--r); padding: 8px 4px; }
.path-nums strong { display: block; font-size: 18px; }
.path-nums span { font-size: 11px; color: var(--muted); }
.path-arrow { color: var(--faint); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.roster-grid th.step { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 500; font-size: 11px; white-space: nowrap; max-height: 140px; padding: 6px 4px; }
.roster-grid td.tick { text-align: center; width: 34px; }
.tick-yes { color: var(--success); }
.tick-no { color: var(--border-strong); }
.attend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.attend-list label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; min-height: 40px; }
.attend-list label:has(input:checked) { border-color: var(--success); background: var(--success-soft); }

/* Person tab */
.care-tab-section + .care-tab-section { margin-top: 22px; }
.care-tab-section h3 { font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.care-tab-section h3 .grow { flex: 1; }

/* Funnel */
.funnel-row { display: grid; grid-template-columns: 170px 1fr 70px; gap: 10px; align-items: center; padding: 6px 0; }
.funnel-bar { height: 22px; background: var(--surface-3); border-radius: 6px; position: relative; overflow: hidden; }
.funnel-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.funnel-bar .f-enrolled { background: #bfdbfe; }
.funnel-bar .f-completed { background: var(--series-1); }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr 60px; } .funnel-row .funnel-label { grid-column: 1 / -1; } }

/* Certificates (print layout) */
.cert { position: relative; margin: 0 auto; max-width: 760px; aspect-ratio: 1.414 / 1; padding: 34px; background: #fffdf7; color: #1f2937; font-family: Georgia, "Times New Roman", serif; text-align: center;
  border: 10px double var(--cert-color, #6d28d9); box-shadow: inset 0 0 0 3px #fffdf7, inset 0 0 0 5px color-mix(in srgb, var(--cert-color, #6d28d9) 40%, transparent); display: flex; flex-direction: column; justify-content: center; }
.cert-logo { height: 56px; margin: 0 auto 8px; }
.cert-church { font-size: 20px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--cert-color, #6d28d9); }
.cert-addr { font-size: 12px; color: #6b7280; margin-bottom: 14px; font-family: var(--font); }
.cert-title { font-size: 30px; font-style: italic; margin: 6px 0 14px; }
.cert-text { font-size: 15px; line-height: 1.7; margin: 0 auto; max-width: 560px; }
.cert-name { font-size: 26px; font-weight: 700; border-bottom: 1px solid #d1d5db; display: inline-block; padding: 0 18px 2px; margin: 6px 0; font-family: Georgia, serif; }
.cert-verse { font-style: italic; font-size: 13px; color: #4b5563; margin: 14px auto 0; max-width: 520px; }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 28px; gap: 20px; font-size: 12px; font-family: var(--font); }
.cert-sign { flex: 1; text-align: center; }
.cert-sign .line { border-top: 1px solid #374151; margin-bottom: 4px; padding-top: 2px; }
.cert-no { font-family: var(--mono); font-size: 11px; color: #6b7280; }
@media print { .cert { box-shadow: none; } @page { size: A4 landscape; margin: 12mm; } }

.care-grad h1 { font-size: 22px; margin-bottom: 2px; }
.care-grad table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.care-grad th, .care-grad td { border-bottom: 1px solid #e5e7eb; padding: 8px 6px; text-align: left; font-size: 14px; }
