/* Baptist Safe Church Register – admin */
.bscr {
	--ink: #1d2433;
	--muted: #64748b;
	--line: #e3e0d8;
	--paper: #ffffff;
	--wash: #f7f5f0;
	--navy: #0f3d5e;
	--accent: #c2410c;
	--ok: #15803d;      --ok-bg: #e7f5ec;
	--warn: #b45309;    --warn-bg: #fef3c7;
	--bad: #b91c1c;     --bad-bg: #fde2e1;
	--hold: #5b21b6;    --hold-bg: #ede9fe;
	--grey: #475569;    --grey-bg: #eef0f3;
	color: var(--ink);
	max-width: 1320px;
}
body.bscr-screen #wpcontent { background: var(--wash, #f7f5f0); }
body.bscr-screen { background: #f7f5f0; }
.bscr a { color: var(--navy); }
.bscr h1, .bscr h2, .bscr h3 { color: var(--ink); }

/* Header */
.bscr-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 14px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bscr-top h1 { font-size: 26px; line-height: 1.2; margin: 2px 0 0; padding: 0; font-weight: 650; letter-spacing: -0.01em; }
.bscr-eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--accent); }
.bscr-top-r { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bscr-church-name { font-weight: 600; }
.bscr-level { font-size: 12px; background: var(--grey-bg); color: var(--grey); border-radius: 999px; padding: 3px 10px; }
.bscr-switch select { min-width: 220px; }
.bscr-lede { font-size: 14px; max-width: 760px; color: var(--muted); margin-top: 0; }

/* Cards & layout */
.bscr-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin: 0 0 16px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.bscr-card > h2:first-child, .bscr-card > summary + h2 { margin-top: 0; }
.bscr-card h2 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bscr-card--alert { border-color: #c4b5fd; background: #faf8ff; }
.bscr-card--warn { border-color: #fcd34d; background: #fffbeb; }
.bscr-card--ok { border-color: #a7f3d0; background: #f0fdf4; }
.bscr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.bscr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.bscr-grid--levels .bscr-card h3 { margin: 0 0 4px; font-size: 14px; }
.bscr-grid--levels .bscr-card p { margin: 0; color: var(--muted); }
.bscr-muted { color: var(--muted); font-size: 12.5px; }
.bscr-count { background: var(--grey-bg); color: var(--grey); font-size: 12px; border-radius: 999px; padding: 1px 9px; font-weight: 600; }
.bscr-h2 { margin-top: 28px; }
.bscr-sub { font-size: 13px; margin: 12px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bscr-empty { text-align: center; padding: 40px 20px; }

/* Forms */
.bscr label { display: block; font-weight: 500; font-size: 13px; }
.bscr label input[type=text], .bscr label input[type=email], .bscr label input[type=tel], .bscr label input[type=date], .bscr label input[type=number], .bscr label select, .bscr label textarea { display: block; width: 100%; margin-top: 3px; font-weight: 400; }
.bscr label.bscr-inline, .bscr .bscr-inline label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.bscr form.bscr-inline { display: inline; }
.bscr textarea { width: 100%; }
.bscr .bscr-wide { width: 100%; }
.bscr-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.bscr-btns form { margin: 0; }
.bscr-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.bscr-filters input[type=search] { min-width: 220px; }
.bscr-filters select { max-width: 260px; }
.bscr-push { margin-left: auto !important; }
.bscr-copy { display: flex; gap: 6px; }
.bscr-copy input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.bscr-checks label { display: inline-flex; gap: 4px; margin-right: 10px; font-weight: 400; }
.bscr-danger { color: var(--bad) !important; }
.bscr-red { color: var(--bad); }
.bscr-chip { background: var(--grey-bg); border-radius: 999px; padding: 4px 10px; }
.bscr-chip a { text-decoration: none; margin-left: 4px; }

details > summary { cursor: pointer; }
.bscr-inline-form { margin-top: 10px; }
.bscr-inline-form > summary { color: var(--navy); font-weight: 500; list-style: none; display: inline-block; }
.bscr-inline-form > summary::-webkit-details-marker { display: none; }
.bscr-inline-form[open] { background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.bscr-inline-form[open] > summary { margin-bottom: 10px; }
.bscr-inline-form form > label, .bscr-inline-form form > fieldset { margin-bottom: 10px; }
.bscr-pop { position: relative; display: inline-block; }
.bscr-pop > summary { list-style: none; }
.bscr-pop > summary::-webkit-details-marker { display: none; }
.bscr-pop[open] > form { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .15); padding: 14px; }
.bscr-pop--right[open] > form { left: auto; right: 0; }
.bscr-pop[open] > form { text-align: left; white-space: normal; }
.bscr-pop form label { margin-bottom: 8px; }
.bscr-add > summary { list-style: none; }
.bscr-add[open] > summary { margin-bottom: 12px; }
.bscr-outcome { border: 0; padding: 0; margin: 0 0 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.bscr-outcome legend { font-weight: 600; margin-bottom: 4px; }
.bscr-outcome label { display: inline-flex; gap: 6px; font-weight: 400; }
.bscr-callhint { background: #eef6fb; border-left: 3px solid var(--navy); padding: 8px 12px; border-radius: 4px; }

/* Stats */
.bscr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bscr-stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--muted) !important; font-size: 13px; font-weight: 500; border-top: 4px solid var(--grey); }
.bscr-stat span { display: block; font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.bscr-stat:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.bscr-stat--cleared { border-top-color: var(--ok); }
.bscr-stat--pending { border-top-color: #d97706; }
.bscr-stat--lapsed { border-top-color: var(--bad); }
.bscr-stat--on_hold { border-top-color: var(--hold); }

/* Badges & pills */
.bscr-badge { display: inline-block; font-weight: 600; font-size: 12px; border-radius: 999px; padding: 3px 11px; letter-spacing: .01em; }
.bscr-badge--cleared { background: var(--ok-bg); color: var(--ok); }
.bscr-badge--pending { background: var(--warn-bg); color: var(--warn); }
.bscr-badge--lapsed { background: var(--bad-bg); color: var(--bad); }
.bscr-badge--on_hold { background: var(--hold-bg); color: var(--hold); }
.bscr-badge--archived { background: var(--grey-bg); color: var(--grey); }
.bscr-pill { display: inline-block; font-size: 11.5px; border-radius: 4px; padding: 2px 7px; font-weight: 600; white-space: nowrap; }
.bscr-pill--ok { background: var(--ok-bg); color: var(--ok); }
.bscr-pill--expiring { background: var(--warn-bg); color: var(--warn); }
.bscr-pill--unverified { background: #e0f2fe; color: #0369a1; }
.bscr-pill--missing { background: var(--grey-bg); color: var(--grey); }
.bscr-pill--expired { background: var(--bad-bg); color: var(--bad); }
.bscr-pill--not_required { background: transparent; color: var(--muted); font-weight: 400; }
.bscr-pill--hold { background: var(--hold-bg); color: var(--hold); }

/* Tables */
.bscr-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.bscr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bscr-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfaf7; }
.bscr-table td { padding: 10px 12px; border-bottom: 1px solid #f0ede6; vertical-align: top; }
.bscr-table tbody tr:hover { background: #fcfbf8; }
.bscr-table tr:last-child td { border-bottom: 0; }
.bscr-name { font-weight: 600; text-decoration: none; }
.bscr-role { display: inline-block; }
.bscr-empty-row { text-align: center; color: var(--muted); padding: 30px !important; }
.bscr-mini { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; }
.bscr-mini th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.bscr-mini td { padding: 7px 8px; border-bottom: 1px solid #f0ede6; vertical-align: top; }
.bscr-actions { text-align: right; white-space: nowrap; }
.bscr-actions > * { margin-left: 4px; }
.bscr-rejected td { background: #fff5f5; }
.bscr-past td { color: var(--muted); }
.bscr-roles-table td { min-width: 110px; }
.bscr-roles-table td:first-child { min-width: 260px; }
.bscr-audit .bscr-details { color: var(--muted); max-width: 420px; word-break: break-word; }
.bscr-bar { display: inline-block; width: 70px; height: 7px; background: var(--grey-bg); border-radius: 4px; overflow: hidden; margin-right: 6px; vertical-align: middle; }
.bscr-bar span { display: block; height: 100%; background: var(--ok); }

/* Queues & lists */
.bscr-queue { margin: 0; padding: 0; list-style: none; }
.bscr-queue li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0ede6; }
.bscr-queue li:last-child { border-bottom: 0; }
.bscr-queue li > a { font-weight: 600; text-decoration: none; }
.bscr-queue li > span { color: var(--muted); text-align: right; }
.bscr-links { margin: 0; padding: 0; list-style: none; }
.bscr-links li { padding: 5px 0; }
.bscr-ministries { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.bscr-ministries li { display: flex; align-items: center; gap: 8px; }

/* Person */
.bscr-person-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; border-left: 5px solid var(--grey); }
.bscr-card--cleared.bscr-person-head { border-left-color: var(--ok); }
.bscr-card--pending.bscr-person-head { border-left-color: #d97706; }
.bscr-card--lapsed.bscr-person-head { border-left-color: var(--bad); }
.bscr-card--on_hold.bscr-person-head { border-left-color: var(--hold); }
.bscr-person-head .bscr-badge { font-size: 14px; padding: 5px 14px; }
.bscr-reasons { margin: 8px 0 0 18px; list-style: disc; }
.bscr-check { padding: 12px 0; border-bottom: 1px solid #f0ede6; }
.bscr-check:last-child { border-bottom: 0; }
.bscr-check-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bscr-check-head h3 { margin: 0; font-size: 14px; min-width: 210px; }
.bscr-ref { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.bscr-ref--concern { border-color: #c4b5fd; background: #fbfaff; }
.bscr-ref--withdrawn { opacity: .6; }
.bscr-ref-head { display: flex; justify-content: space-between; gap: 10px; }
.bscr-concern { background: var(--hold-bg); border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.bscr-answers dt { font-weight: 600; margin-top: 8px; }
.bscr-answers dd { margin: 2px 0 0; color: #334155; }
.bscr-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.bscr-dl dt { color: var(--muted); }
.bscr-dl dd { margin: 0; word-break: break-word; }
.bscr-notes { list-style: none; margin: 12px 0 0; padding: 0; }
.bscr-notes li { padding: 8px 10px; background: var(--wash); border-radius: 6px; margin-bottom: 6px; font-size: 13px; }
.bscr-notes li .bscr-muted { display: block; margin-top: 4px; }
.bscr-note--restricted { background: var(--hold-bg) !important; }
.bscr-activity { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.bscr-activity li { padding: 5px 0; border-bottom: 1px solid #f0ede6; }
.bscr-activity li .bscr-muted { display: block; }
.bscr-side form textarea, .bscr-side form input[type=file] { margin-bottom: 6px; }

/* Responsive */
@media (max-width: 1100px) {
	.bscr-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 782px) {
	.bscr-top h1 { font-size: 22px; }
	.bscr-table thead { display: none; }
	.bscr-table, .bscr-table tbody, .bscr-table tr, .bscr-table td { display: block; width: 100%; box-sizing: border-box; }
	.bscr-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
	.bscr-table td { border: 0; padding: 5px 14px; position: relative; text-align: left; white-space: normal; word-break: break-word; }
	.bscr-table td[data-label] { padding-left: calc(38% + 18px); min-height: 28px; }
	.bscr-table td[data-label]::before { content: attr(data-label); position: absolute; left: 14px; top: 6px; width: 38%; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
	.bscr-table td.bscr-actions { text-align: right; }
	.bscr-pop[open] > form { position: fixed; left: 12px !important; right: 12px !important; top: auto; bottom: 12px; width: auto; }
	.bscr-queue li { flex-direction: column; gap: 2px; }
	.bscr-queue li > span { text-align: left; }
	.bscr-push { margin-left: 0 !important; }
	.bscr-mini { display: block; overflow-x: auto; }
}

/* Reports */
.bscr-report-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.bscr-report-tabs a { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 13px; color: var(--ink); }
.bscr-report-tabs a.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.bscr-report-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.bscr-report-head h2 { margin-bottom: 2px; }
.bscr-report-head p { margin: 0; }

/* Email & security */
.bscr-checks-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 18px; }
.bscr-chk { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f0ede6; font-size: 13px; }
.bscr-chk-i { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.bscr-chk--ok .bscr-chk-i { background: var(--ok-bg); color: var(--ok); }
.bscr-chk--warn .bscr-chk-i { background: var(--warn-bg); color: var(--warn); }
.bscr-chk--bad .bscr-chk-i { background: var(--bad-bg); color: var(--bad); }
.bscr-chk--info .bscr-chk-i { background: #e0f2fe; color: #0369a1; }
.bscr-guide { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.bscr-guide > summary { font-weight: 700; color: var(--navy); }
.bscr-guide ol li { margin-bottom: 8px; }
.bscr-callout { background: #fff7e6; border-left: 4px solid #d97706; border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.bscr-callout p { margin: 4px 0 0; }
.bscr-toggle { display: flex !important; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f0ede6; font-weight: 400 !important; }
.bscr-toggle input { margin-top: 3px !important; }
.bscr-mini th { width: 70px; vertical-align: top; }
.bscr-mini code { word-break: break-all; }
.bscr-guide-page ol li, .bscr-guide-page ul li { margin-bottom: 6px; }

/* Screening questionnaire & process record */
details.bscr-ref > summary.bscr-ref-head { list-style: none; cursor: pointer; align-items: center; }
details.bscr-ref > summary.bscr-ref-head::-webkit-details-marker { display: none; }
details.bscr-ref > summary.bscr-ref-head::before { content: "▸"; color: var(--muted, #6b7280); margin-right: 6px; }
details.bscr-ref[open] > summary.bscr-ref-head::before { content: "▾"; }
details.bscr-ref > summary.bscr-ref-head > div:first-child { flex: 1; }
details.bscr-ref[open] > summary { margin-bottom: 10px; }
.bscr-yes { color: #9a3412; }
.bscr-sq-yes { background: #fff7ed; border-radius: 6px; padding: 4px 8px; }
.bscr-sq-h { font-weight: 700; margin: 14px 0 6px; }
.bscr-sq-health { background: #f5f3ff; border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.bscr-sq-health p { margin: 4px 0; }
.bscr-process td:first-child { font-weight: 600; width: 42%; }
.bscr-actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 12px; }
.bscr-actions-row > details { flex: 1 1 260px; }
.bscr-actions-row > details[open] { flex-basis: 100%; }
