/* Shared appearance tokens. Page heroes retain their established design. */
body .member-form-heading, body .shared-member-form .member-form-heading,
body .dash-card-head, body .cs-card-head, body .users-card-head,
body .dir-group-head, body .dir-head, body .site-colour-preview {
    background: var(--site-primary) !important; color: var(--site-on-primary) !important;
}
body .member-form-heading h3, body .member-form-heading p,
body .dash-card-head h2, body .dash-card-head span, body .dash-card-head a,
body .cs-card-head h2, body .cs-card-head span, body .users-card-head h2,
body .users-card-head h3, body .users-card-head p, body .dir-group-head h3, body .dir-group-head span {
    color: var(--site-on-primary) !important;
}
body .member-form-heading-icon { background: #ffffff20 !important; color: var(--site-on-primary) !important; }
body .dash-page, body .dir-page { background: #f7f8fc !important; }
body .dash-card { background: white; overflow: hidden; }
body .dash-card-head { margin: -22px -24px 20px; padding: 16px 24px; align-items: center; }
body .dir-page { --dir-accent: var(--site-accent-ink); --dir-ink: #152044; --dir-surface: #fff; --dir-surface-2: #f8f9fd; }
body .dir-head { padding: 18px 24px; margin: 0 0 22px; border-radius: 0 0 9px 9px; }
body .dir-search-heading { display: block; margin-bottom: 10px; color: var(--site-on-primary); font-weight: 600; }
body .dir-search input { background: white !important; }
body .dir-row:nth-child(even) { background: #f8f9fd; }
body .pbtn-primary, body .site-accent-button, body .login-button,
body .dir-btn-primary, body .member-form-actions .btn-primary, body .cm-install .cm-install-primary {
    background: var(--site-accent) !important; border-color: var(--site-accent) !important; color: var(--site-on-accent) !important;
}
body .app-nav-drop-btn.on, body .app-nav-links > a.on, body .app-nav-menu a:hover { color: var(--site-accent-ink) !important; }
body .app-hero-icon, body .dash-kpi-icon.is-indigo { color: var(--site-accent-ink) !important; }
body #memberForm #work_position:disabled { background: #eceff4 !important; color: #68717d !important; cursor: not-allowed; opacity: 1; }
.site-colour-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 25px; padding: 24px; }
.site-colour-controls label { color: #152044; font-weight: 600; }
.site-colour-controls input[type=color] { width: 65px; height: 42px; margin: 10px 10px 0 0; vertical-align: middle; padding: 3px; border: 1px solid #d8dce3; border-radius: 7px; }
.site-colour-controls output { font-weight: 400; }
.site-colour-preview { padding: 20px; margin: 0 24px; border-radius: 9px; }
.site-colour-preview h3, .site-colour-preview p { color: var(--site-on-primary) !important; }
.site-colour-preview .btn { margin-top: 12px; }
.site-appearance-note, .site-colour-actions { margin: 18px 24px; }
@media(max-width:767px) { body .dash-card-head { margin: -22px -24px 18px; padding: 16px 20px; } body .dir-head { padding: 16px; } }

body .dir-column-head { display: grid; grid-template-columns: 62px minmax(0,1.05fr) minmax(0,.9fr) minmax(0,1.45fr) auto; gap: 18px; padding: 14px 18px; background: var(--site-primary); color: var(--site-on-primary); border-radius: 9px 9px 0 0; font-weight: 600; }
@media(max-width:900px) { body .dir-column-head { display: none; } }
body .site-appearance .site-colour-actions button { background: var(--site-accent) !important; color: var(--site-on-accent) !important; }
body .member-action-primary, body .btn-primary { background: var(--site-accent) !important; border-color: var(--site-accent) !important; color: var(--site-on-accent) !important; }

/* Statistics uses the same section headings as the dashboard and forms. */
body .rs-chart-box { overflow: hidden; }
body .rs-chart-box > h3 { background: var(--site-primary) !important; color: var(--site-on-primary) !important; margin: -20px -20px 18px !important; padding: 16px 20px; }
/* Church Settings section headers align with the card edges. */
body .church-settings .cs-card { overflow: hidden; }
body .church-settings .cs-card-head {
    margin: -22px -24px 22px;
    padding: 18px 24px;
    align-items: center;
    border-bottom: 0;
    min-height: 68px;
}
body .church-settings .cs-card-head h2 {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 16.5px;
    line-height: 1.3;
}
body .church-settings .cs-card-head h2 i { margin-right: 8px; }
body .church-settings .cs-card-head .cs-saved { line-height: 1.5; }
@media (max-width: 575px) {
    body .church-settings .cs-card-head { gap: 8px; }
    body .church-settings .cs-card-head .cs-saved { flex-basis: 100%; }
}
