:root {
    --navy: #071a44;
    --navy-2: #061033;
    --ink: #0b1745;
    --muted: #64708d;
    --line: #dfe6f4;
    --surface: #ffffff;
    --soft: #f6f8fc;
    --purple: #6d37df;
    --purple-dark: #3d178f;
    --blue: #1976f3;
    --green: #31b96f;
    --gold: #ffc928;
    --orange: #f59e1b;
    --red: #ef4444;
    --shadow: 0 22px 60px rgba(9, 24, 68, .12);
    --radius: 8px;
    font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: #f7f9fe;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.auth-page {
    background: #f6f9fd;
}

.auth-shell {
    width: min(920px, calc(100vw - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.auth-card {
    min-height: 698px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(15, 34, 55, .07);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15, 34, 55, .12);
}

.auth-brand-panel {
    position: relative;
    min-height: 698px;
    overflow: hidden;
    background: linear-gradient(180deg, #2d1370 0%, #190842 100%);
}

.auth-brand-shapes {
    position: absolute;
    inset: 0;
}

.auth-brand-shapes::before,
.auth-brand-shapes::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
}

.auth-brand-shapes::before {
    width: 190px;
    height: 190px;
    right: -58px;
    top: -76px;
}

.auth-brand-shapes::after {
    width: 138px;
    height: 138px;
    left: -48px;
    bottom: -62px;
}

.brand-overlay {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: 48px 34px;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.brand-lockup,
.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 800;
}

.brand-mark {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 18px);
    grid-template-rows: repeat(2, 18px);
    gap: 5px;
    width: 41px;
    height: 41px;
}

.brand-mark span {
    display: block;
    background: #fff;
}

.brand-mark span:nth-child(1) {
    border-radius: 22px 10px 10px 22px;
}

.brand-mark span:nth-child(2) {
    border-radius: 10px 22px 22px 10px;
}

.brand-mark span:nth-child(3) {
    border-radius: 22px 10px 10px 22px;
}

.brand-mark span:nth-child(4) {
    border-radius: 10px 22px 22px 10px;
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    background: var(--purple);
}

.brand-name {
    font-size: .75rem;
    line-height: .95;
    letter-spacing: 2px;
}

.brand-name small {
    display: block;
    margin-top: 6px;
    color: var(--gold);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-message {
    margin-top: auto;
    max-width: 360px;
    padding-bottom: 128px;
}

.auth-message h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 3vw, 2.55rem);
    line-height: 1.08;
    font-weight: 900;
}

.auth-message p {
    margin: 20px 0 0;
    max-width: 340px;
    color: rgba(255, 255, 255, .92);
    font-size: 1rem;
    line-height: 1.5;
}

.auth-metric-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.auth-metric-row span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: .82rem;
    font-weight: 900;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.mission-grid div {
    min-width: 0;
}

.mission-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.12rem;
    background: rgba(109, 55, 223, .74);
    border-radius: var(--radius);
}

.mission-grid strong {
    display: block;
    font-size: .82rem;
}

.mission-grid p {
    margin: 4px 0 0;
    font-size: .76rem;
    line-height: 1.32;
    color: rgba(255, 255, 255, .88);
}

blockquote {
    max-width: 720px;
    margin: 16px 0 0;
    font-size: .76rem;
    line-height: 1.55;
    font-style: italic;
    color: rgba(255, 255, 255, .93);
}

blockquote cite {
    display: block;
    margin-top: 12px;
    color: var(--gold);
    font-style: normal;
    font-weight: 800;
}

.login-panel {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 698px;
    padding: 52px 30px;
}

.mobile-login-brand {
    display: none;
}

.request-access-action span {
    display: inline-grid;
    place-items: center;
}

.login-form {
    width: min(394px, 100%);
    text-align: left;
}

.form-heading {
    text-align: center;
}

.form-heading span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin-bottom: 14px;
    padding: 0 16px;
    border: 1px solid rgba(109, 55, 223, .32);
    border-radius: 999px;
    background: rgba(109, 55, 223, .08);
    color: var(--purple);
    font-size: .82rem;
    font-weight: 900;
}

.form-heading h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 900;
}

.form-heading p {
    margin: 12px auto 34px;
    max-width: 330px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.45;
}

.field-group {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: .84rem;
}

.auth-status,
.auth-errors {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: .82rem;
    line-height: 1.4;
}

.auth-status {
    color: #147c46;
    background: #e7f8ef;
    border: 1px solid #bfeacf;
}

.auth-errors {
    color: #a72222;
    background: #fff1f1;
    border: 1px solid #ffd3d3;
}

.auth-errors p {
    margin: 0;
}

.auth-errors p + p {
    margin-top: 6px;
}

.field-control {
    display: flex;
    align-items: center;
    height: 52px;
    border: 1px solid #d2d9e2;
    border-radius: 12px;
    background: #f8fafc;
    transition: .2s ease;
}

.field-control:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(109, 55, 223, .12);
}

.field-control input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    padding: 0 18px;
    font-size: 1rem;
}

.field-control input::placeholder {
    color: #8994af;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.password-toggle {
    width: auto;
    min-width: 58px;
    margin-right: 10px;
    color: var(--purple);
    font-size: .86rem;
    font-weight: 900;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: .78rem;
}

.form-row a,
.admin-note a {
    color: #4b18d5;
    font-weight: 700;
}

.remember-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-control input {
    position: absolute;
    opacity: 0;
}

.remember-control span {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--purple);
}

.remember-control span::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.primary-action,
.google-action {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}

.primary-action {
    color: #fff;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
    box-shadow: 0 14px 28px rgba(89, 41, 206, .22);
}

.primary-action span {
    font-size: 1rem;
}

.divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 24px 0;
    color: var(--muted);
    font-size: .8rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.google-action,
.request-access-action {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.request-access-action {
    width: 100%;
    height: 48px;
    border: 2px solid var(--purple);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #5c2bd1;
    font-size: 1rem;
    font-weight: 900;
}

.secondary-request-access-action {
    margin-top: 10px;
    border-color: #dbe4f3;
    color: var(--ink);
}

.request-access-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.google-action span {
    color: #ea4335;
    font-weight: 800;
}

.admin-note {
    margin: 10px 0 0;
    font-size: .78rem;
    text-align: center;
    color: var(--muted);
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding-bottom: 18px;
    color: #5e6984;
    font-size: .76rem;
}

.auth-footer a {
    color: #3715ba;
}

.dashboard-page {
    background: #f6f8fc;
}

.dashboard-shell,
.church-dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    transition: grid-template-columns .2s ease;
}

.dashboard-shell.sidebar-collapsed,
.church-dashboard-shell.sidebar-collapsed {
    grid-template-columns: 84px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 18px;
    color: #fff;
    background: linear-gradient(180deg, #111065, #05193d 72%, #061126);
    scrollbar-color: rgba(255, 255, 255, .34) transparent;
    scrollbar-width: thin;
    transition: padding .2s ease, transform .2s ease;
}

.church-sidebar {
    background: linear-gradient(180deg, #2b116d, #111065 58%, #061126);
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, .32);
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.brand-mark.small {
    grid-template-columns: repeat(2, 18px);
    grid-template-rows: repeat(2, 18px);
    gap: 5px;
    width: 41px;
    height: 41px;
}

.brand-mark.small::after {
    inset: 13px;
}

.brand-mark.small span:nth-child(n) {
    border-radius: 8px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.sidebar-brand {
    min-width: 0;
    flex: 1;
    gap: 12px;
    margin: 0 0 0 8px;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1.05;
    text-decoration: none;
}

.sidebar-brand-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, .74);
    font-size: .56rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.sidebar-collapse-button {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar-collapse-button svg {
    width: 17px;
    height: 17px;
}

.sidebar-collapse-button:hover,
.sidebar-collapse-button:focus-visible {
    border-color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .18);
    outline: 0;
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .86);
    font-size: .9rem;
}

.side-nav-group {
    display: grid;
    gap: 4px;
}

.side-nav-parent {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .86);
    font-size: .9rem;
    cursor: pointer;
}

.side-nav-parent::-webkit-details-marker {
    display: none;
}

.side-nav-group summary {
    list-style: none;
}

.side-nav-group.active .side-nav-parent {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.side-nav-caret {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    transition: transform .2s ease;
}

.side-nav-caret svg {
    width: 15px;
    height: 15px;
}

.side-nav-group[open] .side-nav-caret {
    transform: rotate(180deg);
}

.side-nav-children {
    display: grid;
    gap: 3px;
    padding: 2px 0 2px 32px;
}

.side-nav a.side-nav-child {
    min-height: 36px;
    padding: 0 10px;
    gap: 9px;
    font-size: .82rem;
    color: rgba(255, 255, 255, .76);
}

.side-nav-child-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    flex: 0 0 auto;
}

.side-nav a.side-nav-child.active .side-nav-child-dot {
    background: #fff;
}

.side-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav-icon {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.side-nav-icon svg {
    width: 19px;
    height: 19px;
    display: block;
}

.side-nav a.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(109, 55, 223, .95), rgba(128, 72, 231, .78));
}

.side-nav a em {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #9d68ec;
    font-style: normal;
    font-size: .72rem;
}

.sidebar-collapsed .sidebar {
    padding: 24px 12px;
}

.sidebar-collapsed .sidebar-head {
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}

.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
}

.sidebar-collapsed .sidebar-brand-text,
.sidebar-collapsed .side-nav-label,
.sidebar-collapsed .side-nav-badge,
.sidebar-collapsed .side-nav-caret,
.sidebar-collapsed .side-nav-children {
    display: none;
}

.sidebar-collapsed .brand-mark.small {
    width: 38px;
    height: 38px;
    grid-template-columns: repeat(2, 16px);
    grid-template-rows: repeat(2, 16px);
}

.sidebar-collapsed .side-nav a {
    justify-content: center;
    min-height: 46px;
    padding: 0;
}

.sidebar-collapsed .side-nav-parent {
    justify-content: center;
    min-height: 46px;
    padding: 0;
}

.sidebar-collapsed .side-nav-icon {
    width: 22px;
    height: 22px;
}

.sidebar-collapsed .sidebar-collapse-button {
    position: absolute;
    top: 72px;
    right: 8px;
    width: 28px;
    height: 28px;
    transform: rotate(180deg);
}

.main-panel {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
}

.menu-button {
    display: none;
}

.search-field {
    width: min(370px, 100%);
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: #7e8aa5;
}

.search-field input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    font-size: .9rem;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-actions form {
    margin: 0;
}

.notification-button {
    position: relative;
}

.menu-button span {
    display: none;
}

.icon-button svg {
    width: 18px;
    height: 18px;
    display: block;
}

.notification-button strong {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: .62rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #7a5436, #1d58b5);
    border-radius: 50%;
    font-weight: 800;
    font-size: .82rem;
}

.user-chip p {
    margin: 0;
    font-size: .9rem;
    font-weight: 700;
}

.user-chip small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 500;
    font-size: .75rem;
}

.account-menu {
    position: relative;
}

.account-menu-toggle {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: .2s ease;
    white-space: nowrap;
}

.account-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(135deg, #7a5436, #1d58b5);
    border-radius: 50%;
    font-weight: 800;
    font-size: .82rem;
}

.account-summary {
    min-width: 0;
    max-width: 190px;
    display: grid;
    gap: 2px;
    text-align: left;
    font-size: .9rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-summary small,
.account-menu-header small {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-chevron {
    display: inline-grid;
    place-items: center;
    color: #3415bf;
    transition: transform .2s ease;
}

.account-menu-chevron svg,
.account-menu-item svg {
    width: 16px;
    height: 16px;
}

.account-menu-toggle:hover,
.account-menu-toggle:focus-visible,
.account-menu.open .account-menu-toggle {
    border-color: #b8c7e7;
    background: #f6f3ff;
    outline: 0;
}

.account-menu.open .account-menu-chevron {
    transform: rotate(180deg);
}

.account-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    width: min(260px, calc(100vw - 28px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(12, 21, 56, .16);
}

.account-menu-panel[hidden] {
    display: none;
}

.account-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 12px;
    border-bottom: 1px solid var(--line);
}

.account-menu-header p {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu-header small {
    display: block;
    margin-top: 2px;
}

.account-menu-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    color: #251052;
    background: transparent;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
    background: #f5f2ff;
    color: #3415bf;
    outline: 0;
}

.account-menu-item.danger {
    color: #b42318;
}

.dashboard-content {
    padding: 22px;
    display: grid;
    gap: 18px;
}

.dashboard-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 30px rgba(9, 24, 68, .05);
}

.dashboard-title-row p,
.dashboard-title-row h1 {
    margin: 0;
}

.dashboard-title-row p {
    color: #130f99;
    font-weight: 800;
    font-size: .85rem;
}

.dashboard-title-row h1 {
    margin-top: 4px;
    font-size: 1.6rem;
    line-height: 1.1;
}

.dashboard-title-row span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.dashboard-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-title-actions span {
    margin-right: 4px;
}

.reference-band,
.module-section,
.flow-section,
.panel-card,
.stat-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 30px rgba(9, 24, 68, .05);
}

.reference-band {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
}

.reference-column {
    padding: 22px 24px;
}

.reference-column + .reference-column {
    border-left: 1px solid var(--line);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.section-heading.compact {
    align-items: center;
}

.section-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #3321c9;
    background: #f4f6ff;
    border-radius: var(--radius);
    font-weight: 800;
}

.section-heading p,
.section-heading h1,
.section-heading h2 {
    margin: 0;
}

.section-heading p {
    color: #130f99;
    font-weight: 800;
    font-size: 1.05rem;
}

.section-heading h1 {
    margin-top: 2px;
    font-size: clamp(1.25rem, 2vw, 2rem);
    line-height: 1.1;
    font-weight: 800;
}

.section-heading h2 {
    color: #130f99;
    font-size: 1.22rem;
    font-weight: 800;
}

.section-heading > span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #dfe6f5;
    border-radius: 999px;
    color: #64708a;
    background: #fff;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.reference-column > p,
.goal-list {
    margin: 0;
    color: #172346;
    line-height: 1.55;
}

.goal-list {
    padding-left: 18px;
    list-style: disc;
}

.module-section,
.flow-section {
    padding: 18px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 10px;
}

.module-pill {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.module-pill strong {
    font-size: .75rem;
    line-height: 1.2;
}

.module-icon,
.stat-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    font-weight: 800;
}

.blue {
    color: var(--blue);
    background: #eef5ff;
}

.green {
    color: var(--green);
    background: #ecfff5;
}

.violet {
    color: var(--purple);
    background: #f2edff;
}

.orange {
    color: var(--orange);
    background: #fff6e6;
}

.red {
    color: var(--red);
    background: #fff0f0;
}

.approval-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 22px;
}

.approval-flow article {
    position: relative;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #cbd5e7;
    border-radius: var(--radius);
    background: #fff;
}

.approval-flow article:not(:last-child)::after {
    content: "ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€šÃ‚Â ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢";
    position: absolute;
    right: -18px;
    color: var(--ink);
}

.approval-flow span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 800;
}

.approval-flow strong {
    font-size: .78rem;
    line-height: 1.25;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
}

.dashboard-filter-card {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
    align-items: end;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 30px rgba(9, 24, 68, .05);
}

.dashboard-filter-card p,
.dashboard-filter-card h2 {
    margin: 0;
}

.dashboard-filter-card p {
    color: #130f99;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-filter-card h2 {
    margin-top: 4px;
    font-size: 1.25rem;
    line-height: 1.15;
}

.dashboard-filter-form {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(230px, 1.25fr) auto auto;
    align-items: end;
    gap: 10px;
}

.admin-dashboard-filter-form {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
}

.dashboard-filter-form label {
    display: grid;
    gap: 6px;
    color: #45536e;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-filter-form select,
.dashboard-filter-form input {
    min-width: 0;
    min-height: 40px;
    border: 1px solid #dbe4f3;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 700;
    text-transform: none;
}

.approvals-filter-form {
    grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(140px, 1fr)) auto auto;
    padding: 12px 0 16px;
}

.primary-admin-button.compact {
    min-height: 40px;
    padding: 0 16px;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.finance-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
    --kpi-accent: #1976f3;
    --kpi-soft: #eef5ff;
    position: relative;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 18px 16px 16px;
    border: 1px solid #e7edf8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(9, 24, 68, .05);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.kpi-card.blue { --kpi-accent: #1976f3; --kpi-soft: #eef5ff; }
.kpi-card.green { --kpi-accent: #17a862; --kpi-soft: #e6fbf0; }
.kpi-card.violet { --kpi-accent: #8b5ce6; --kpi-soft: #f3edff; }
.kpi-card.orange { --kpi-accent: #e58a13; --kpi-soft: #fff4e3; }
.kpi-card.red { --kpi-accent: #ef4444; --kpi-soft: #ffecec; }

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--kpi-accent);
}

.kpi-card::after {
    content: "";
    position: absolute;
    top: -34px;
    right: -34px;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: var(--kpi-soft);
    opacity: .65;
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: #d7e0f2;
    box-shadow: 0 18px 40px rgba(9, 24, 68, .09);
}

.kpi-icon {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 12px;
    color: var(--kpi-accent);
    background: var(--kpi-soft);
}

.kpi-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.kpi-label {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.kpi-value {
    position: relative;
    z-index: 1;
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
}

.kpi-detail {
    position: relative;
    z-index: 1;
    color: #64708a;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-chart-grid .chart-panel {
    grid-column: span 6;
    min-height: 0;
}

.dashboard-chart-grid .pie-panel {
    grid-column: span 5;
}

.dashboard-chart-grid .bars-panel.lead {
    grid-column: span 7;
}

.dashboard-chart-grid .bars-panel.wide {
    grid-column: span 8;
}

.dashboard-chart-grid .actions-panel {
    grid-column: span 4;
}

.pie-layout {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.svg-donut.lg {
    width: 190px;
    flex: 0 0 190px;
    filter: drop-shadow(0 10px 22px rgba(9, 24, 68, .12));
}

.svg-donut.lg + .legend-list {
    flex: 1 1 200px;
    min-width: 0;
}

.coverage-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, .75fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #edf2fb;
}

.coverage-row:last-child {
    border-bottom: 0;
}

.coverage-row div {
    min-width: 0;
}

.coverage-row strong,
.coverage-row span {
    display: block;
}

.coverage-row strong {
    color: var(--ink);
    font-size: .9rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.coverage-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.coverage-row b {
    color: var(--ink);
    font-size: .95rem;
}

.coverage-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2fb;
}

.coverage-bar i {
    display: block;
    width: var(--bar-width, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1976f3, #31b96f);
}

.coverage-row.members .coverage-bar i {
    background: linear-gradient(90deg, #31b96f, #f59e1b);
}

.coverage-row.typed .coverage-bar i {
    background: var(--bar-color, #1976f3);
}

.coverage-row.compact {
    grid-template-columns: minmax(0, 1fr) minmax(90px, .6fr) auto;
}

.dashboard-donut-wrap {
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.dashboard-donut-wrap .donut-chart {
    width: 156px;
}

.svg-donut {
    position: relative;
    width: 156px;
    aspect-ratio: 1;
    flex: 0 0 156px;
}

.svg-donut svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(-90deg);
}

.donut-bg {
    fill: none;
    stroke: #e7edf8;
    stroke-width: 6;
}

.donut-segment {
    fill: none;
    stroke-width: 6;
    stroke-linecap: butt;
}

.donut-center {
    position: absolute;
    inset: 30px;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: #fff;
    text-align: center;
}

.donut-center strong,
.donut-center span {
    display: block;
}

.donut-center strong {
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
}

.donut-center span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
}

.legend-dot {
    width: 12px;
    height: 12px;
    display: block;
    flex: 0 0 12px;
}

.compact-legend {
    flex: 1 1 180px;
    min-width: 0;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-quick-card {
    min-height: 104px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 7px;
    padding: 13px;
    border: 1px solid #e4ebf7;
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    background: #fbfcff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dashboard-quick-card:hover,
.dashboard-quick-card:focus-visible {
    border-color: #cfd9ef;
    box-shadow: 0 14px 30px rgba(9, 24, 68, .08);
    outline: 0;
    transform: translateY(-1px);
}

.dashboard-quick-card.attention {
    border-left-color: var(--orange);
}

.dashboard-quick-card.plan,
.dashboard-quick-card.ok {
    border-left-color: var(--green);
}

.dashboard-quick-card.calendar {
    border-left-color: var(--blue);
}

.dashboard-quick-card.access {
    border-left-color: var(--purple);
}

.dashboard-quick-card span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #3415bf;
    background: #f4f1ff;
}

.dashboard-quick-card svg {
    width: 17px;
    height: 17px;
}

.dashboard-quick-card strong {
    font-size: .92rem;
}

.dashboard-quick-card small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.analytics-grid.admin-compact-grid .panel-card {
    grid-column: span 4;
}

.compact-panel {
    min-height: 0;
}

.compact-metric-list div {
    padding: 10px 12px;
}

.admin-growth-dashboard {
    gap: 14px;
    padding: 18px;
}

.admin-growth-dashboard .dashboard-title-row {
    min-height: 70px;
    padding: 14px 16px;
    border-radius: 8px;
}

.admin-growth-dashboard .dashboard-title-row p {
    font-size: .74rem;
}

.admin-growth-dashboard .dashboard-title-row h1 {
    font-size: 1.28rem;
}

.admin-growth-dashboard .dashboard-filter-card {
    grid-template-columns: minmax(150px, .3fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: none;
}

.admin-growth-dashboard .dashboard-filter-card h2 {
    font-size: .98rem;
}

.admin-growth-dashboard .dashboard-filter-card p {
    font-size: .68rem;
}

.admin-growth-dashboard .admin-dashboard-filter-form {
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto auto;
    gap: 8px;
}

.admin-growth-dashboard .admin-dashboard-filter-form:has([data-fcc-region-field]:not([hidden])) {
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto auto;
}

.admin-growth-dashboard .dashboard-filter-form label {
    gap: 4px;
    font-size: .68rem;
}

.admin-growth-dashboard .dashboard-filter-form select {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: .78rem;
}

.admin-growth-dashboard .primary-admin-button.compact,
.admin-growth-dashboard .dashboard-filter-form .secondary-link {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: .76rem;
}

.admin-growth-dashboard .admin-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.admin-growth-dashboard .kpi-card {
    min-height: 108px;
    gap: 4px;
    padding: 13px 12px 12px;
    border-radius: 8px;
    box-shadow: none;
}

.admin-growth-dashboard .kpi-card::before {
    height: 3px;
}

.admin-growth-dashboard .kpi-card::after {
    width: 58px;
    height: 58px;
    top: -22px;
    right: -18px;
    opacity: .45;
}

.admin-growth-dashboard .kpi-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 4px;
    border-radius: 8px;
}

.admin-growth-dashboard .kpi-icon svg {
    width: 15px !important;
    height: 15px !important;
    display: block;
    flex: 0 0 15px;
}

.admin-growth-dashboard .kpi-label {
    font-size: .66rem;
    letter-spacing: 0;
}

.admin-growth-dashboard .kpi-value {
    font-size: 1.38rem;
}

.admin-growth-dashboard .kpi-detail {
    font-size: .68rem;
}

.admin-growth-dashboard .panel-card {
    border-radius: 8px;
    box-shadow: none;
}

.admin-growth-dashboard .card-header {
    padding-bottom: 10px;
}

.admin-growth-dashboard .card-header h2 {
    font-size: .94rem;
}

.admin-growth-dashboard .card-header p {
    font-size: .72rem;
}

.admin-growth-dashboard .dashboard-chart-grid {
    gap: 12px;
}

.admin-growth-dashboard .coverage-row {
    padding: 9px 0;
}

.admin-growth-dashboard .coverage-row strong {
    font-size: .82rem;
}

.admin-growth-dashboard .coverage-row span {
    font-size: .7rem;
}

.admin-growth-dashboard .coverage-row b {
    font-size: .82rem;
}

.admin-growth-dashboard .svg-donut.lg {
    width: 132px;
    flex-basis: 132px;
}

.admin-growth-dashboard .donut-center {
    inset: 24px;
}

.admin-growth-dashboard .donut-center strong {
    font-size: 1.02rem;
}

.admin-growth-dashboard .donut-center span {
    font-size: .66rem;
}

.admin-growth-dashboard .legend-list {
    min-width: 150px;
    gap: 8px;
    font-size: .74rem;
}

.admin-growth-dashboard .dashboard-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-growth-dashboard .dashboard-quick-card {
    min-height: 78px;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
}

.admin-growth-dashboard .dashboard-quick-card span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.admin-growth-dashboard .dashboard-quick-card svg {
    width: 14px !important;
    height: 14px !important;
}

.admin-growth-dashboard .dashboard-quick-card strong {
    font-size: .82rem;
}

.admin-growth-dashboard .dashboard-quick-card small {
    font-size: .64rem;
}

.admin-growth-dashboard .quick-access-strip-panel {
    min-height: auto;
    padding: 12px 14px;
}

.admin-growth-dashboard .dashboard-quick-strip {
    grid-template-columns: repeat(7, minmax(112px, 1fr));
    gap: 10px;
}

.admin-growth-dashboard .dashboard-quick-strip .dashboard-quick-card {
    min-height: 64px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon detail";
    align-content: center;
    column-gap: 10px;
    row-gap: 2px;
    padding: 10px 12px;
    border-left-width: 1px;
}

.admin-growth-dashboard .dashboard-quick-strip .dashboard-quick-card span {
    grid-area: icon;
}

.admin-growth-dashboard .dashboard-quick-strip .dashboard-quick-card small {
    grid-area: title;
    color: var(--ink);
    font-size: .7rem;
    line-height: 1.2;
}

.admin-growth-dashboard .dashboard-quick-strip .dashboard-quick-card strong {
    grid-area: detail;
    color: var(--muted);
    font-size: .66rem;
    line-height: 1.2;
}

.admin-growth-dashboard .dashboard-filter-card.slim {
    align-items: center;
    background: #fff;
}

.admin-growth-dashboard .filter-card-copy {
    align-self: center;
}

.admin-growth-dashboard .chart-panel {
    padding: 14px 16px;
    background: #fff;
}

.admin-growth-dashboard .chart-panel.lead,
.admin-growth-dashboard .pipeline-panel,
.admin-growth-dashboard .trend-panel {
    grid-column: span 6;
}

.admin-growth-dashboard .pie-panel {
    grid-column: span 6;
}

.admin-growth-dashboard .status-mini-grid {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.admin-growth-dashboard .status-mini-card {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #e6edf8;
    border-radius: 8px;
    background: #fbfdff;
    color: var(--ink);
    font-size: .75rem;
    font-weight: 800;
}

.admin-growth-dashboard .status-mini-card i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.admin-growth-dashboard .status-mini-card span {
    color: var(--muted);
}

.admin-growth-dashboard .status-mini-card b {
    color: var(--muted);
    font-size: .72rem;
}

.pipeline-flow {
    min-height: 190px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
}

.pipeline-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.pipeline-step span {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 2px solid color-mix(in srgb, var(--step-color) 55%, #fff);
    border-radius: 999px;
    background: color-mix(in srgb, var(--step-color) 12%, #fff);
    color: var(--step-color);
    box-shadow: 0 12px 22px color-mix(in srgb, var(--step-color) 16%, transparent);
}

.pipeline-step svg {
    width: 24px !important;
    height: 24px !important;
}

.pipeline-step strong {
    color: var(--ink);
    font-size: 1.1rem;
    line-height: 1;
}

.pipeline-step small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
}

.pipeline-arrow {
    display: none;
}

.dashboard-line-chart {
    width: 100%;
    min-height: 190px;
    display: block;
}

.dashboard-line-chart .line-grid line {
    stroke: #e7edf8;
    stroke-width: 1;
}

.dashboard-line-chart .line-area {
    fill: url(#registrationTrendFill);
}

.dashboard-line-chart .line-path {
    fill: none;
    stroke: #7441dc;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-line-chart circle {
    fill: #7441dc;
    stroke: #fff;
    stroke-width: 2;
}

.dashboard-line-chart text {
    fill: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-anchor: middle;
}

.dashboard-line-chart .line-value {
    fill: #7441dc;
    font-size: 11px;
    font-weight: 900;
}

.dashboard-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-feature-section {
    display: grid;
    gap: 2px;
}

.dashboard-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.church-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-feature-card {
    min-height: 178px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e3e9f6;
    border-left: 4px solid #6d37df;
    border-radius: var(--radius);
    color: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(250, 252, 255, .94));
    box-shadow: 0 12px 30px rgba(9, 24, 68, .055);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dashboard-feature-card:hover,
.dashboard-feature-card:focus-visible {
    border-color: #cfd9ef;
    box-shadow: 0 18px 42px rgba(9, 24, 68, .09);
    outline: 0;
    transform: translateY(-2px);
}

.dashboard-feature-card.attention {
    border-left-color: var(--orange);
}

.dashboard-feature-card.ok,
.dashboard-feature-card.plan {
    border-left-color: var(--green);
}

.dashboard-feature-card.calendar {
    border-left-color: var(--blue);
}

.dashboard-feature-card.access {
    border-left-color: var(--purple);
}

.feature-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #3415bf;
    background: #f4f1ff;
}

.feature-icon svg {
    width: 19px;
    height: 19px;
}

.dashboard-feature-card.attention .feature-icon {
    color: #b45309;
    background: #fff7ed;
}

.dashboard-feature-card.ok .feature-icon,
.dashboard-feature-card.plan .feature-icon {
    color: #14704a;
    background: #ecfdf3;
}

.dashboard-feature-card.calendar .feature-icon {
    color: #1d4ed8;
    background: #eff6ff;
}

.dashboard-feature-card small {
    color: #64708a;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-feature-card strong {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.2;
}

.dashboard-feature-card p {
    margin: 0;
    color: #475569;
    font-size: .82rem;
    line-height: 1.45;
}

.report-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.signal-card {
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 30px rgba(9, 24, 68, .05);
}

.signal-card.attention {
    border-left-color: var(--orange);
}

.signal-card.ok,
.signal-card.plan {
    border-left-color: var(--green);
}

.signal-card.calendar {
    border-left-color: var(--blue);
}

.signal-card.access {
    border-left-color: var(--purple);
}

.signal-card span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.signal-card strong {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.signal-card p {
    margin: 0;
    color: #334155;
    font-size: .84rem;
    line-height: 1.45;
}

.signal-card small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.35;
}

.signal-card .secondary-link {
    justify-self: start;
    margin-top: 4px;
}

.signal-card .secondary-link svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
}

.stat-card {
    min-height: 112px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.church-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.church-kpi-grid .stat-card {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.church-kpi-grid .stat-icon {
    width: 44px;
    height: 44px;
}

.church-kpi-grid .stat-icon svg {
    width: 20px;
    height: 20px;
}

.church-kpi-grid .stat-card strong {
    font-size: 1.35rem;
    line-height: 1.12;
}

.church-kpi-grid .stat-card small {
    display: block;
    line-height: 1.35;
}

.church-home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.church-home-kpi {
    --kpi-accent: #1976f3;
    --kpi-soft: #eef5ff;
    position: relative;
    min-width: 0;
    min-height: 148px;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 7px;
    overflow: hidden;
    padding: 16px;
    border: 1px solid #dce6f6;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}

.church-home-kpi::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--kpi-accent);
}

.church-home-kpi::after {
    content: "";
    position: absolute;
    right: -26px;
    top: -34px;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    background: var(--kpi-soft);
}

.church-home-kpi.attendance { --kpi-accent: #1976f3; --kpi-soft: #eef5ff; }
.church-home-kpi.profile { --kpi-accent: #17a862; --kpi-soft: #e6fbf0; }
.church-home-kpi.plan { --kpi-accent: #e58a13; --kpi-soft: #fff4e3; }
.church-home-kpi.events { --kpi-accent: #7441dc; --kpi-soft: #f1edff; }
.church-home-kpi.finance { --kpi-accent: #0891b2; --kpi-soft: #e6f8fb; }

.church-home-kpi .kpi-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 0;
    border-radius: 10px;
    color: var(--kpi-accent);
    background: var(--kpi-soft);
}

.church-home-kpi .kpi-icon svg {
    width: 19px;
    height: 19px;
}

.church-home-kpi p,
.church-home-kpi strong,
.church-home-kpi small,
.church-home-kpi .kpi-progress {
    position: relative;
    z-index: 1;
}

.church-home-kpi p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: .73rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.25;
}

.church-home-kpi strong {
    color: var(--ink);
    font-size: clamp(1.15rem, 1.5vw, 1.55rem);
    font-weight: 950;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.church-home-kpi small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.35;
}

.kpi-progress {
    align-self: end;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef8;
}

.kpi-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--kpi-accent);
}

.church-home-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 14px;
    align-items: stretch;
}

.church-home-chart-card {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.church-home-chart-card .card-header {
    gap: 12px;
}

.church-home-bar-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.church-home-bar-row {
    display: grid;
    grid-template-columns: 52px minmax(120px, 1fr) minmax(76px, max-content);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #edf1fa;
    border-radius: 8px;
    background: #fff;
}

.church-home-bar-row > span {
    color: var(--ink);
    font-size: .78rem;
    font-weight: 950;
}

.church-home-bar-row > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.church-home-bar-row i {
    display: block;
    height: 8px;
    min-width: 0;
    border-radius: 999px;
    background: #edf2f9;
}

.church-home-bar-row i.income {
    background: #16a34a;
}

.church-home-bar-row i.expense {
    background: #f97316;
}

.church-home-bar-row strong {
    color: var(--ink);
    font-size: .78rem;
    font-weight: 950;
    text-align: right;
    overflow-wrap: anywhere;
}

.church-home-donut-wrap {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.church-home-donut {
    width: min(180px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    justify-self: center;
    position: relative;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #fff 0 55%, transparent 56%),
        conic-gradient(
            #16a34a 0 var(--income-share, 0%),
            #f97316 var(--income-share, 0%) calc(var(--income-share, 0%) + var(--expense-share, 0%)),
            #edf2f9 0 100%
        );
    box-shadow: inset 0 0 0 1px #e5edf9, 0 18px 35px rgba(15, 23, 42, .08);
}

.church-home-donut strong,
.church-home-donut span {
    grid-area: 1 / 1;
}

.church-home-donut strong {
    align-self: center;
    margin-top: -10px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 950;
    max-width: 112px;
    text-align: center;
    overflow-wrap: anywhere;
}

.church-home-donut span {
    align-self: center;
    margin-top: 34px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.church-home-pie-metrics {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.church-home-pie-metrics div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #edf1fa;
    border-radius: 8px;
    background: #fff;
}

.church-home-pie-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
}

.church-home-pie-metrics i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.church-home-pie-metrics i.income {
    background: #16a34a;
}

.church-home-pie-metrics i.expense {
    background: #f97316;
}

.church-home-pie-metrics strong {
    color: var(--ink);
    font-size: .95rem;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.church-home-pie-metrics small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.stat-icon.blue {
    background: var(--blue);
}

.stat-icon.green {
    background: var(--green);
}

.stat-icon.orange {
    background: var(--orange);
}

.stat-icon.violet {
    background: #8b5ce6;
}

.stat-card p {
    margin: 0;
    font-size: .82rem;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin: 3px 0;
    font-size: 1.55rem;
    font-weight: 800;
}

.stat-card small {
    color: #31405f;
    font-size: .76rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.analytics-grid .panel-card:nth-child(1),
.analytics-grid .panel-card:nth-child(2) {
    grid-column: span 6;
}

.analytics-grid .panel-card:nth-child(3),
.analytics-grid .panel-card:nth-child(4) {
    grid-column: span 6;
}

.panel-card {
    min-height: 260px;
    padding: 18px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.card-header h2 {
    margin: 0;
    font-size: 1rem;
}

.card-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.4;
}

.map-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.map-download-button svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
}

.map-download-button[disabled] {
    opacity: .68;
    cursor: progress;
    pointer-events: none;
    transform: none;
}

.card-header button,
.card-header select {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8faff;
    color: #210bc0;
    font-size: .75rem;
    font-weight: 700;
    padding: 0 12px;
}

.donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
}

.donut-chart {
    width: 178px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    position: relative;
}

.donut-chart::before {
    content: "";
    position: absolute;
    inset: 36px;
    border-radius: 50%;
    background: #fff;
}

.region-donut {
    background: conic-gradient(#2f80ed 0 20%, #29b6f6 20% 42%, #48c774 42% 62%, #ffb020 62% 79%, #a66de6 79% 100%);
}

.approval-donut {
    background: conic-gradient(#ffbe25 0 50%, #46c27a 50% 87.5%, #ef4444 87.5% 100%);
}

.donut-chart strong,
.donut-chart span {
    position: relative;
    z-index: 1;
}

.donut-chart strong {
    align-self: end;
    font-size: 1.55rem;
}

.donut-chart span {
    align-self: start;
    color: var(--muted);
    font-size: .8rem;
}

.legend-list {
    display: grid;
    gap: 12px;
    min-width: 210px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: .82rem;
}

.legend-list li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.legend-list b {
    margin-left: auto;
    color: var(--ink);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
}

.central { background: #2f80ed; }
.western { background: #29b6f6; }
.eastern { background: #48c774; }
.northern { background: #ffb020; }
.southern { background: #a66de6; }
.pending { background: #ffbe25; }
.approved { background: #46c27a; }
.rejected { background: #ef4444; }

.line-chart svg {
    width: 100%;
    height: 220px;
}

.grid-line {
    stroke: #e5ebf5;
    stroke-width: 1;
}

.score-line {
    fill: none;
    stroke: var(--blue);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.score-fill {
    fill: url(#scoreFill);
}

.score-dot {
    fill: var(--blue);
    stroke: #fff;
    stroke-width: 3;
}

.month-labels {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    color: var(--muted);
    font-size: .72rem;
    text-align: center;
}

.registration-list {
    display: grid;
    gap: 14px;
}

.registration-list div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
}

.list-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: #f6f8fc;
    color: #8a92a8;
}

.registration-list p {
    min-width: 0;
    margin: 0;
    font-weight: 800;
    font-size: .88rem;
}

.registration-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 500;
}

.registration-list time {
    color: var(--muted);
    font-size: .74rem;
}

.registration-list em {
    padding: 5px 12px;
    border-radius: 999px;
    font-style: normal;
    font-weight: 800;
    font-size: .72rem;
}

.registration-list em.pending {
    color: #b36a00;
    background: #fff2d1;
}

.registration-list em.approved {
    color: #147c46;
    background: #dff8ec;
}

.metric-list,
.activity-list,
.setup-list {
    display: grid;
    gap: 12px;
}

.metric-list div,
.activity-list div,
.setup-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid #e7edf8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.metric-list p,
.activity-list p {
    min-width: 0;
    margin: 0;
    font-weight: 800;
    font-size: .9rem;
}

.metric-list small,
.activity-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 500;
    font-size: .75rem;
}

.metric-list strong,
.setup-list strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.activity-list span,
.setup-list span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.summary-grid div {
    min-height: 90px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e7edf8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.summary-grid span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.summary-grid strong {
    font-size: 1.45rem;
}

.empty-state {
    margin: 0;
    padding: 18px;
    border: 1px dashed #cbd6ea;
    border-radius: var(--radius);
    color: var(--muted);
    background: #fbfcff;
    font-weight: 700;
}

.admin-status {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #bfeacf;
    border-radius: var(--radius);
    color: #147c46;
    background: #e7f8ef;
    font-weight: 800;
}

.admin-errors {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #ffd3d3;
    border-radius: var(--radius);
    color: #a72222;
    background: #fff1f1;
    font-weight: 800;
}

.admin-errors p {
    margin: 0;
}

.primary-admin-button,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.primary-admin-button {
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
    box-shadow: 0 10px 22px rgba(89, 41, 206, .16);
}

.secondary-link {
    border: 1px solid #d8e1f2;
    color: #3415bf;
    background: #fff;
}

.primary-admin-button:hover,
.primary-admin-button:focus-visible {
    background: linear-gradient(90deg, #6730d0, #4f22bf);
    box-shadow: 0 14px 26px rgba(89, 41, 206, .20);
    outline: 0;
    transform: translateY(-1px);
}

.secondary-link:hover,
.secondary-link:focus-visible {
    border-color: #b8c7e7;
    background: #f6f3ff;
    outline: 0;
}

.admin-table-card {
    min-height: auto;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e8eef8;
    text-align: left;
    vertical-align: middle;
    font-size: .86rem;
}

.admin-table th {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.table-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-tags span,
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
}

.table-tags span {
    color: #3415bf;
    background: #f2edff;
}

.status-pill.approved {
    color: #147c46;
    background: #dff8ec;
}

.status-pill.pending {
    color: #b36a00;
    background: #fff2d1;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.table-actions a,
.table-actions button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: #fff;
    color: #3415bf;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.table-actions button[data-modal-open^="delete-"],
.table-actions form button {
    border-color: #ffd2d2;
    color: #c92525;
    background: #fff8f8;
}

.table-actions a:hover,
.table-actions a:focus-visible,
.table-actions button:hover,
.table-actions button:focus-visible {
    background: #f6f3ff;
    outline: 0;
}

.table-actions button[data-modal-open^="delete-"]:hover,
.table-actions button[data-modal-open^="delete-"]:focus-visible,
.table-actions form button:hover,
.table-actions form button:focus-visible {
    background: #fff1f1;
}

.hierarchy-filter-form,
.report-filter-form,
.map-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, .7fr)) auto auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e1e8f5;
    border-radius: var(--radius);
    background: #fbfcff;
}

.report-filter-form {
    grid-template-columns: minmax(220px, 1.15fr) repeat(5, minmax(150px, .75fr)) auto;
}

.finance-filter-form {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) repeat(8, minmax(120px, .7fr)) auto;
}

.church-finance-period-form {
    grid-template-columns: minmax(150px, .6fr) minmax(120px, .45fr) auto;
}

.finance-workspace-filter {
    grid-template-columns: minmax(150px, .7fr) minmax(150px, .7fr) minmax(110px, .45fr) minmax(150px, .65fr) auto;
}

.finance-subnav,
.side-subnav,
.finance-action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.finance-action-group {
    justify-content: flex-end;
}

.finance-action-group .primary-admin-button,
.finance-action-group .secondary-link {
    min-height: 36px;
}

.finance-subnav {
    margin: 4px 0 16px;
    padding: 6px;
    border: 1px solid #e6ecf7;
    border-radius: 8px;
    background: #fbfcff;
}

.finance-subnav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 6px;
    color: #56627a;
    font-size: .8rem;
    font-weight: 900;
    text-decoration: none;
}

.finance-subnav a.active {
    color: #6427d4;
    background: #f4efff;
}

.side-subnav {
    display: grid;
    gap: 4px;
    margin: -4px 0 8px 48px;
}

.side-subnav a {
    min-height: 30px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}

.side-subnav a.active,
.side-subnav a:hover,
.side-subnav a:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    outline: 0;
}

.sidebar-collapsed .side-subnav {
    display: none;
}

.map-filter-form {
    grid-template-columns: repeat(2, minmax(145px, .65fr)) minmax(220px, 1.2fr) repeat(3, minmax(145px, .75fr)) auto;
}

.hierarchy-filter-form label,
.report-filter-form label,
.map-filter-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.hierarchy-filter-form input,
.hierarchy-filter-form select,
.report-filter-form input,
.report-filter-form select,
.map-filter-form input,
.map-filter-form select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #ccd6ea;
    border-radius: var(--radius);
    padding: 0 12px;
    color: var(--ink);
    background: #fff;
}

.hierarchy-filter-form input:focus,
.hierarchy-filter-form select:focus,
.report-filter-form input:focus,
.report-filter-form select:focus,
.map-filter-form input:focus,
.map-filter-form select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(109, 55, 223, .12);
    outline: 0;
}

.map-preview-card {
    min-height: auto;
}

.map-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .75fr);
    gap: 16px;
    align-items: stretch;
}

.map-main-stack {
    display: grid;
    gap: 14px;
}

.church-map-shell {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: #eef3fb;
}

.church-map-real {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.church-map-real.leaflet-container {
    color: var(--ink);
    font-family: inherit;
}

.map-pin-marker {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
}

.map-pin-marker span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 8px;
    color: #fff;
    background: linear-gradient(135deg, #7437df, #1d58b5);
    box-shadow: 0 12px 24px rgba(9, 24, 68, .24);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    transform: rotate(-45deg);
}

.map-pin-marker span {
    font-variant-numeric: tabular-nums;
}

.map-pin-marker b {
    display: block;
    font-weight: 900;
    transform: rotate(45deg);
}

.map-cluster-badge {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(29, 88, 181, .24);
}

.map-cluster-badge span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d58b5, #10734a);
    box-shadow: 0 14px 30px rgba(9, 24, 68, .22);
    font-size: .82rem;
    font-weight: 900;
}

.map-popup {
    display: grid;
    gap: 5px;
    min-width: 210px;
}

.map-popup strong {
    color: var(--ink);
    font-size: .9rem;
}

.map-popup span,
.map-popup small {
    color: #334155;
    font-size: .78rem;
    line-height: 1.35;
}

.map-popup small {
    color: var(--muted);
    font-weight: 800;
}

.map-popup a {
    justify-self: start;
    margin-top: 4px;
    color: #3415bf;
    font-size: .78rem;
    font-weight: 900;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    border: 1px solid #d8e1f2;
    box-shadow: 0 18px 40px rgba(9, 24, 68, .18);
}

.leaflet-control-layers {
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    color: var(--ink);
    box-shadow: 0 12px 28px rgba(9, 24, 68, .12);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 800;
}

.leaflet-control-layers-expanded {
    padding: 8px 10px;
}

.map-legend {
    position: absolute;
    left: 14px;
    bottom: 28px;
    z-index: 500;
    display: grid;
    gap: 8px;
    width: min(270px, calc(100% - 28px));
    padding: 12px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 16px 34px rgba(9, 24, 68, .14);
    backdrop-filter: blur(8px);
}

.map-legend-title {
    margin: 0;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.map-legend-item strong {
    min-width: 0;
    color: var(--ink);
    font-size: .76rem;
    font-weight: 900;
    line-height: 1.2;
}

.map-legend-item small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
}

.legend-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
}

.legend-icon.church {
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 6px;
    background: linear-gradient(135deg, #7437df, #1d58b5);
    box-shadow: 0 8px 16px rgba(9, 24, 68, .18);
    transform: rotate(-45deg);
}

.legend-icon.church::after {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #fff;
    content: "";
}

.legend-icon.cluster {
    border: 3px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #1d58b5, #10734a);
    box-shadow: 0 0 0 4px rgba(29, 88, 181, .16);
}

.legend-icon.cluster::after {
    color: #fff;
    content: "3";
    font-size: .68rem;
    font-weight: 900;
}

.legend-icon.district-live,
.legend-icon.district-reference,
.legend-icon.missing {
    border-radius: 999px;
}

.legend-icon.district-live {
    border: 2px solid #1d58b5;
    background: rgba(47, 128, 237, .28);
}

.legend-icon.district-reference {
    border: 2px solid #10734a;
    background: rgba(70, 194, 122, .18);
}

.legend-icon.missing {
    border: 2px dashed #a66a00;
    background: #fff6e6;
}

.map-count-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.map-count-panel {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: #fbfcff;
}

.map-count-panel .map-list-header {
    position: static;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid #e1e8f5;
    border-radius: 0;
    background: transparent;
}

.map-count-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #edf2fb;
    border-radius: var(--radius);
    background: #fff;
}

.map-count-row p {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.map-count-row small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.map-count-row strong {
    color: #1d58b5;
    font-size: 1rem;
    font-weight: 900;
}

.district-coverage-panel {
    max-height: 330px;
    overflow: hidden;
}

.district-coverage-grid {
    overflow: auto;
    display: grid;
    gap: 8px;
    padding-right: 4px;
}

.church-map-canvas {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background:
        linear-gradient(rgba(255, 255, 255, .72), rgba(255, 255, 255, .72)),
        linear-gradient(90deg, rgba(43, 120, 95, .08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(43, 120, 95, .08) 1px, transparent 1px),
        linear-gradient(135deg, #eef8f0 0%, #eff6ff 54%, #fff8ec 100%);
    background-size: auto, 48px 48px, 48px 48px, auto;
}

.map-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-country {
    fill: rgba(71, 178, 130, .18);
    stroke: rgba(23, 87, 62, .55);
    stroke-width: 2;
}

.map-country.focus {
    fill: rgba(73, 194, 128, .32);
    stroke: #1d7a54;
    stroke-width: 3;
}

.map-country.kenya {
    fill: rgba(47, 128, 237, .17);
    stroke: rgba(29, 88, 181, .62);
}

.map-country.context {
    fill: rgba(255, 176, 32, .12);
    stroke: rgba(150, 108, 42, .42);
}

.map-water {
    fill: rgba(47, 128, 237, .18);
    stroke: rgba(47, 128, 237, .38);
    stroke-width: 1.5;
}

.map-art text {
    fill: rgba(9, 24, 68, .55);
    font-size: 22px;
    font-weight: 900;
}

.church-map-marker {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 3;
    display: grid;
    place-items: center;
    transform: translate(-50%, -100%);
}

.marker-dot {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 8px;
    color: #fff;
    background: linear-gradient(135deg, #7437df, #1d58b5);
    box-shadow: 0 14px 26px rgba(9, 24, 68, .26);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    transform: rotate(-45deg);
}

.marker-dot::before {
    content: attr(data-index);
    display: block;
    transform: rotate(45deg);
}

.church-map-marker .marker-dot {
    font-variant-numeric: tabular-nums;
}

.marker-tooltip {
    position: absolute;
    left: 50%;
    top: 36px;
    min-width: 190px;
    padding: 9px 10px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    box-shadow: 0 14px 30px rgba(9, 24, 68, .16);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-4px);
    transition: .18s ease;
}

.marker-tooltip strong,
.marker-tooltip small {
    display: block;
}

.marker-tooltip strong {
    font-size: .78rem;
}

.marker-tooltip small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .72rem;
}

.church-map-marker:hover .marker-tooltip,
.church-map-marker:focus-visible .marker-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.map-empty-state {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: min(320px, calc(100% - 32px));
    margin: 0;
    padding: 14px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(255, 255, 255, .94);
    font-weight: 800;
    text-align: center;
    transform: translate(-50%, -50%);
}

.map-location-list {
    max-height: 560px;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 10px;
    padding-right: 4px;
}

.map-list-header,
.map-location-item {
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: #fff;
}

.map-list-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
}

.map-list-header h2 {
    margin: 0;
    font-size: .92rem;
}

.map-list-header span {
    min-width: 32px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #1d58b5;
    font-size: .76rem;
    font-weight: 900;
}

.map-location-item {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.map-location-item strong,
.map-location-item p,
.map-location-item small {
    display: block;
}

.map-location-item strong {
    color: var(--ink);
    font-size: .88rem;
}

.map-location-item p {
    margin: 4px 0;
    color: #334155;
    font-size: .8rem;
    line-height: 1.35;
}

.map-location-item small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
}

.map-location-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.map-location-actions form {
    margin: 0;
}

.map-location-actions span,
.map-location-actions a,
.map-location-actions button {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: var(--radius);
    padding: 0 9px;
    font-size: .72rem;
    font-weight: 900;
}

.map-location-actions span.mapped {
    color: #10734a;
    background: #ecfff5;
}

.map-location-actions span.missing {
    color: #a66a00;
    background: #fff6e6;
}

.map-location-actions a {
    border: 1px solid #d8e1f2;
    color: #3415bf;
    background: #fff;
}

.map-location-actions button {
    border: 1px solid #d8e1f2;
    color: #0c4a6e;
    background: #eff8ff;
    cursor: pointer;
}

.pagination-row {
    padding-top: 16px;
}

.pagination-row nav > div:first-child {
    display: none;
}

.pagination-row nav > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.pagination-row nav > div:last-child > div:last-child > span {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    background: #fff;
}

.pagination-row p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.pagination-row p span {
    color: var(--ink);
    font-weight: 800;
}

.pagination-row nav > div:last-child > div:last-child a,
.pagination-row nav > div:last-child > div:last-child span[aria-current] > span,
.pagination-row nav > div:last-child > div:last-child span[aria-disabled] > span {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-right: 1px solid #d8e1f2;
    color: #3415bf;
    background: #fff;
    font-size: .82rem;
    font-weight: 800;
}

.pagination-row nav > div:last-child > div:last-child span:last-child > span,
.pagination-row nav > div:last-child > div:last-child a:last-child {
    border-right: 0;
}

.pagination-row nav > div:last-child > div:last-child span[aria-current] > span {
    color: #fff;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
}

.pagination-row nav > div:last-child > div:last-child span[aria-disabled] > span {
    color: #94a1ba;
    background: #f8faff;
    cursor: not-allowed;
}

.pagination-row nav > div:last-child > div:last-child a:hover,
.pagination-row nav > div:last-child > div:last-child a:focus-visible {
    background: #f6f3ff;
    outline: 0;
}

.pagination-row svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
}

body.modal-open {
    overflow: hidden;
}

.admin-modal-backdrop {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(9, 24, 68, .52);
}

.admin-modal-backdrop[hidden] {
    display: none;
}

.admin-modal {
    width: min(820px, 100%);
    max-height: min(760px, calc(100dvh - 40px));
    overflow: auto;
    display: grid;
    gap: 0;
    padding: 0;
    border: 1px solid #dbe4f3;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 24px 70px rgba(9, 24, 68, .24);
}

.admin-modal.compact {
    width: min(460px, 100%);
}

.admin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e8eef8;
    background: #fbfcff;
}

.admin-modal-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.admin-modal-header .icon-button {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    color: var(--muted);
    background: #fff;
    font-size: 1.2rem;
    line-height: 1;
}

.admin-modal .compact-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    margin: 0;
    padding: 18px 20px 20px;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.admin-modal .compact-admin-form label {
    gap: 7px;
}

.admin-modal .compact-admin-form input,
.admin-modal .compact-admin-form select,
.admin-modal .compact-admin-form textarea {
    min-height: 50px;
    border-color: #cdd8ed;
    background: #fbfcff;
    font-weight: 800;
}

.admin-modal .compact-admin-form label > span {
    color: #52617f;
    font-size: .76rem;
    text-transform: uppercase;
}

.admin-modal .compact-admin-form .compact-check {
    grid-column: 1 / -1;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid #dfe6f4;
    border-radius: var(--radius);
    background: #fbfcff;
}

.admin-modal .compact-admin-form .compact-check input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: #5c2bd1;
}

.modal-copy {
    margin: 0;
    padding: 16px 20px 0;
    color: #334155;
    font-size: .88rem;
    line-height: 1.45;
}

.admin-modal.compact .modal-copy {
    margin: 16px 20px 0;
    padding: 12px 14px;
    border: 1px solid #ffd2d2;
    border-radius: var(--radius);
    color: #9f1d1d;
    background: #fff8f8;
    font-weight: 800;
}

.admin-modal.compact form {
    padding: 16px 20px 20px;
}

.modal-danger-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 18px;
    border-top: 1px solid #f2d6d6;
    background: #fff8f8;
}

.modal-danger-row span {
    color: #9f1239;
    font-size: .8rem;
    font-weight: 800;
}

.modal-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 6px;
}

.access-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.access-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    color: #3415bf;
    background: #fff;
    font-size: .82rem;
    font-weight: 800;
}

.access-tabs a.active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
}

.admin-form {
    display: grid;
    gap: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-field {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.admin-field > span,
.compact-admin-form label > span,
.church-inline-form label > span,
.stack-list label > span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.required-star {
    color: #d01818;
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.compact-admin-form input,
.compact-admin-form select,
.compact-admin-form textarea,
.church-inline-form input,
.church-inline-form select,
.church-inline-form textarea,
.stack-list input,
.stack-list select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #ccd6ea;
    border-radius: var(--radius);
    padding: 0 13px;
    color: var(--ink);
    outline: 0;
    background: #fff;
}

.admin-field textarea {
    min-height: 120px;
    padding: 12px 13px;
    resize: vertical;
}

.compact-admin-form textarea,
.church-inline-form textarea {
    min-height: 96px;
    padding: 12px 13px;
    resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.compact-admin-form input:focus,
.compact-admin-form select:focus,
.compact-admin-form textarea:focus,
.church-inline-form input:focus,
.church-inline-form select:focus,
.church-inline-form textarea:focus,
.stack-list input:focus,
.stack-list select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(109, 55, 223, .12);
}

.admin-field small,
.form-error {
    margin: 0;
    color: #c92525;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.admin-check input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    height: 18px;
    flex: 0 0 18px;
    padding: 0;
}

.admin-field .field-help {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.35;
}

.family-needs-field {
    align-content: start;
}

.family-needs-check {
    min-height: 72px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce6f6;
    border-radius: var(--radius);
    background: #fbfcff;
    cursor: pointer;
}

.family-needs-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.family-needs-check .custom-checkmark {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid #aebbd3;
    border-radius: 5px;
    background: #fff;
}

.family-needs-check .custom-checkmark::after {
    content: "";
    width: 5px;
    height: 9px;
    display: none;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.family-needs-check input[type="checkbox"]:checked + .custom-checkmark {
    border-color: #6d37df;
    background: #6d37df;
}

.family-needs-check input[type="checkbox"]:checked + .custom-checkmark::after {
    display: block;
}

.family-needs-check input[type="checkbox"]:focus-visible + .custom-checkmark {
    box-shadow: 0 0 0 4px rgba(109, 55, 223, .14);
}

.family-needs-check strong,
.family-needs-check small {
    display: block;
}

.family-needs-check strong {
    color: var(--ink);
    font-size: .86rem;
    line-height: 1.25;
}

.family-needs-check small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.35;
}

.role-picker {
    display: grid;
    gap: 12px;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.role-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #e0e7f5;
    border-radius: var(--radius);
    background: #fbfcff;
    font-size: .84rem;
    font-weight: 800;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.account-layout {
    align-content: start;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-panel,
.account-access-card,
.account-alert {
    min-height: auto;
}

.account-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-left: 4px solid var(--orange);
}

.account-alert h2 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.account-alert p {
    margin: 0 0 10px;
    color: #334155;
    font-size: .86rem;
    line-height: 1.45;
}

.account-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-access-grid > div {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.account-access-grid > div > span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.account-permission-tags {
    max-height: 154px;
    overflow-y: auto;
}

.user-detail-card {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.user-detail-card div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.user-detail-card span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.gps-lookup-card {
    min-height: auto;
}

.gps-lookup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gps-lookup-grid article {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.gps-lookup-grid span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.gps-lookup-grid strong {
    color: var(--ink);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.gps-lookup-grid small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.gps-lookup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.gps-lookup-actions form {
    margin: 0;
}

.gps-lookup-actions button svg,
.gps-lookup-actions a svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
}

.gps-lookup-actions button[disabled] {
    opacity: .52;
    cursor: not-allowed;
}

.admin-wide-card {
    grid-column: span 12;
}

.analytics-grid .admin-wide-card {
    grid-column: span 12;
}

.compact-admin-form,
.stack-list form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.compact-admin-form {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.compact-admin-form label,
.stack-list label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.compact-admin-form label:not(.admin-check):not(.target-scope-option):not(.church-option),
.stack-list label:not(.admin-check) {
    display: grid;
    align-items: stretch;
    gap: 6px;
}

.compact-admin-form input[type="checkbox"],
.church-inline-form input[type="checkbox"],
.stack-list input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

.church-profile-card form {
    display: grid;
    gap: 18px;
}

.church-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.church-year-plan-grid {
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
}

.church-year-plan-grid #church-calendar {
    min-width: 0;
}

.church-year-plan-stack {
    display: grid;
    gap: 14px;
}

.church-year-plan-summary-card,
.church-year-calendar-card {
    min-height: auto;
}

.church-year-plan-summary-card .card-header {
    align-items: center;
    margin-bottom: 12px;
}

.church-year-plan-summary-card .church-record-list {
    margin-top: 0;
}

.church-year-calendar-card {
    min-width: 0;
    overflow: hidden;
}

.church-year-calendar-card .church-calendar-board {
    margin-top: 0;
}

.church-workspace-modal {
    width: min(880px, 100%);
}

.church-workspace-modal .admin-modal-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.church-registration-modal {
    width: min(1080px, 100%);
}

.church-registration-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 20px 20px;
}

.church-registration-details .detail-list-card {
    padding: 14px;
    border: 1px solid #e0e8f5;
    border-radius: var(--radius);
    background: #fbfcff;
}

.church-registration-details h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 900;
}

.church-module-card {
    min-height: auto;
}

.compact-admin-form .wide-field {
    grid-column: 1 / -1;
    display: grid;
    align-items: stretch;
}

.compact-admin-form .compact-check,
.church-inline-form .compact-check {
    justify-content: flex-start;
    min-height: 48px;
}

.compact-admin-form button {
    min-height: 42px;
}

.calendar-event-admin-panel[hidden] {
    display: none;
}

.calendar-event-admin-panel {
    min-height: auto;
}

.calendar-event-admin-panel .card-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.calendar-event-admin-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    margin-bottom: 0;
}

.calendar-target-field {
    gap: 10px;
}

.calendar-target-heading,
.calendar-event-form-actions,
.church-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-target-heading > span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}

.calendar-target-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.target-scope-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #dfe6f4;
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}

.target-scope-option:has(input:checked) {
    border-color: #7a65de;
    background: #f6f3ff;
    box-shadow: 0 0 0 3px rgba(109, 55, 223, .1);
}

.compact-admin-form .target-scope-option input {
    width: auto;
    min-height: auto;
    margin-top: 3px;
}

.target-scope-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.target-scope-option strong,
.target-scope-option small {
    overflow-wrap: anywhere;
}

.target-scope-option strong {
    color: var(--ink);
    font-size: .84rem;
}

.target-scope-option small {
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.35;
}

.selected-churches-panel[hidden] {
    display: none;
}

.selected-churches-panel {
    display: grid;
    gap: 8px;
}

.select-all-churches {
    margin-left: auto;
}

.church-selector-grid {
    max-height: 230px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid #dfe6f4;
    border-radius: var(--radius);
    background: #fff;
}

.compact-admin-form .church-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 9px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.compact-admin-form .church-option input {
    width: auto;
    min-height: auto;
    margin-top: 3px;
}

.church-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.church-option strong,
.church-option small {
    overflow-wrap: anywhere;
}

.church-option strong {
    color: var(--ink);
    font-size: .8rem;
}

.church-option small {
    color: var(--muted);
    font-size: .72rem;
}

.calendar-event-form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.church-card-actions {
    justify-content: flex-end;
}

.church-card-actions .secondary-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: .76rem;
}

.calendar-board-card {
    min-height: auto;
    overflow: hidden;
    background: #fff;
}

.calendar-view-shell {
    background: #f8f9fe;
}

.calendar-view-shell .sidebar {
    background:
        radial-gradient(circle at 76% 18%, rgba(129, 73, 231, .3), transparent 9rem),
        linear-gradient(180deg, #2b116d 0%, #130a4a 52%, #07051f 100%);
}

.calendar-view-shell .dashboard-content {
    gap: 14px;
    padding: 20px 22px 28px;
}

.calendar-view-shell .dashboard-title-row {
    padding: 4px 0 14px;
    border: 0;
    border-bottom: 1px solid #e9edf7;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.calendar-view-shell .dashboard-title-row p {
    color: #64708a;
    font-size: .78rem;
}

.calendar-view-shell .dashboard-title-row h1 {
    margin-top: 2px;
    color: #17213d;
    font-size: 1.35rem;
}

.calendar-view-shell .stats-grid,
.calendar-view-shell .dashboard-signal-grid,
.calendar-view-shell .dashboard-feature-section {
    display: none;
}

.calendar-view-shell .calendar-board-card,
.church-calendar-view-shell .church-module-card#church-calendar,
.church-year-plan-view-shell .church-module-card#church-calendar {
    min-height: auto;
    padding: 0;
    border: 1px solid #e9edf7;
    border-radius: 10px;
    box-shadow: 0 18px 46px rgba(18, 27, 56, .06);
}

.church-calendar-view-shell .church-module-card#church-calendar,
.church-year-plan-view-shell .church-module-card#church-calendar {
    display: flex;
    flex-direction: column;
}

.calendar-view-shell .calendar-board-card > .card-header,
.church-calendar-view-shell .church-module-card#church-calendar > .card-header,
.church-year-plan-view-shell .church-module-card#church-calendar > .card-header {
    order: 1;
    align-items: center;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid #edf1fa;
}

.calendar-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 38px;
    padding: 3px;
    border: 1px solid #e5eaf5;
    border-radius: 8px;
    background: #fff;
}

.calendar-view-tabs span {
    min-width: 58px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    color: #6a748c;
    font-size: .72rem;
    font-weight: 900;
}

.calendar-view-tabs span.active {
    color: #6427d4;
    background: #f4efff;
}

.calendar-view-tabs span.disabled {
    color: #98a3b8;
    background: transparent;
    cursor: default;
    opacity: .72;
}

.calendar-view-shell .calendar-planner-shell {
    padding: 14px;
}

.calendar-planner-shell {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.calendar-side-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.mini-calendar-card,
.calendar-upcoming-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e8edf7;
    border-radius: 8px;
    background: #fbfcff;
}

.calendar-reminder-card {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #eadfff;
    border-radius: 8px;
    background: linear-gradient(180deg, #f7f1ff, #fff);
}

.calendar-reminder-card strong,
.calendar-reminder-card p {
    margin: 0;
}

.calendar-reminder-card strong {
    color: #2a1b6c;
    font-size: .78rem;
    font-weight: 900;
}

.calendar-reminder-card p {
    margin-top: 5px;
    color: #69758d;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.35;
}

.calendar-reminder-card > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #6d37df;
    background: #fff;
    box-shadow: 0 8px 20px rgba(109, 55, 223, .12);
}

.calendar-reminder-card svg {
    width: 16px;
    height: 16px;
}

.mini-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.mini-calendar-header strong {
    color: var(--ink);
    font-size: .84rem;
    font-weight: 900;
}

.mini-calendar-header span {
    color: #6d37df;
    font-size: .72rem;
    font-weight: 900;
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.mini-calendar-weekday,
.mini-calendar-day {
    min-width: 0;
    min-height: 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: .68rem;
    font-weight: 900;
}

.mini-calendar-weekday {
    color: var(--muted);
}

.mini-calendar-day {
    position: relative;
    color: #24324f;
}

.mini-calendar-day.muted-day {
    color: #a7b1c4;
}

.mini-calendar-day.today {
    color: #fff;
    background: #6d37df;
    box-shadow: 0 8px 18px rgba(109, 55, 223, .22);
}

.mini-calendar-day.has-event:not(.today)::after {
    content: "";
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6d37df;
}

.calendar-upcoming-list {
    display: grid;
    gap: 10px;
}

.calendar-upcoming-item {
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr);
    gap: 9px;
    min-width: 0;
    padding: 9px;
    border: 1px solid #edf1fa;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(19, 31, 67, .04);
}

.calendar-upcoming-item > span {
    width: 5px;
    min-height: 100%;
    border-radius: 999px;
    background: #6d37df;
}

.calendar-upcoming-item:nth-child(3n + 2) > span {
    background: #1f9b5b;
}

.calendar-upcoming-item:nth-child(3n) > span {
    background: #f2842f;
}

.calendar-upcoming-item div,
.calendar-upcoming-item strong,
.calendar-upcoming-item small {
    min-width: 0;
}

.calendar-upcoming-item strong {
    display: block;
    color: var(--ink);
    font-size: .76rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.calendar-upcoming-item small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.calendar-main-panel,
.calendar-board {
    min-width: 0;
}

.calendar-board {
    display: grid;
    gap: 10px;
}

.calendar-weekdays,
.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
}

.calendar-weekdays span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #edf1fa;
    border-right: 0;
    color: #24324f;
    background: #fbfcff;
    font-size: .7rem;
    font-weight: 900;
    text-align: center;
}

.calendar-weekdays span:last-child {
    border-right: 1px solid #edf1fa;
}

.calendar-day-cell {
    position: relative;
    min-width: 0;
    min-height: 132px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 9px;
    border: 1px solid #edf1fa;
    border-top: 0;
    border-right: 0;
    border-radius: 0;
    background: #fff;
}

.calendar-day-cell:nth-child(7n) {
    border-right: 1px solid #edf1fa;
}

.calendar-month-grid .calendar-day-cell:nth-last-child(-n + 7) {
    border-bottom: 1px solid #edf1fa;
}

.calendar-day-cell.muted-day {
    background: #fbfcff;
    opacity: .72;
}

.calendar-day-cell.service-day {
    background: linear-gradient(180deg, #fffaf0 0%, #fff 70%);
}

.calendar-day-number {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-day-number span {
    color: var(--ink);
    font-size: .88rem;
    font-weight: 900;
}

.calendar-day-cell.service-day .calendar-day-number span {
    color: #704f00;
}

.calendar-day-cell:focus-visible {
    outline: 2px solid rgba(109, 55, 223, .45);
    outline-offset: -2px;
}

.calendar-day-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
}

.calendar-day-badges small {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 0 7px;
    border-radius: 999px;
    color: #fff;
    background: #6d37df;
    font-size: .68rem;
    font-weight: 900;
}

.calendar-day-badges .service-day-label {
    color: #704f00;
    background: #fff0bd;
}

.calendar-day-badges .event-count-label {
    color: #155e75;
    background: #ecfeff;
}

.calendar-day-events {
    display: grid;
    gap: 7px;
}

.calendar-event-pill {
    display: grid;
    gap: 3px;
    min-width: 0;
    width: 100%;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid #e8ddff;
    border-left: 4px solid #6d37df;
    border-radius: 6px;
    background: #f6f0ff;
    text-align: left;
}

.calendar-event-action {
    font: inherit;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.calendar-event-action:hover,
.calendar-event-action:focus-visible {
    border-color: #c5adff;
    box-shadow: 0 10px 22px rgba(109, 55, 223, .12);
    outline: 0;
    transform: translateY(-1px);
}

.calendar-event-pill.service-event {
    border-left-color: #1f9b5b;
    border-color: #cfeedd;
    background: #f1fbf6;
}

.calendar-event-pill:nth-child(3n) {
    border-left-color: #f2842f;
    border-color: #ffdcbf;
    background: #fff7ef;
}

.calendar-event-pill:nth-child(4n) {
    border-left-color: #2f75db;
    border-color: #d9e8ff;
    background: #f2f7ff;
}

.calendar-event-pill strong,
.calendar-event-pill span,
.calendar-event-pill small {
    overflow-wrap: anywhere;
}

.calendar-event-pill strong {
    color: var(--ink);
    font-size: .74rem;
    line-height: 1.2;
}

.calendar-event-pill > span,
.calendar-event-pill > small {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
}

.calendar-day-tooltip {
    position: absolute;
    z-index: 45;
    top: 42px;
    left: 10px;
    width: min(330px, 72vw);
    max-height: 320px;
    padding: 12px;
    border: 1px solid #dfe6f5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(24, 34, 61, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease;
}

.calendar-day-cell:nth-child(7n) .calendar-day-tooltip,
.calendar-day-cell:nth-child(7n + 6) .calendar-day-tooltip {
    right: 10px;
    left: auto;
}

.calendar-day-cell:hover .calendar-day-tooltip,
.calendar-day-cell:focus-within .calendar-day-tooltip,
.calendar-day-cell:focus-visible .calendar-day-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.calendar-day-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2fb;
}

.calendar-day-tooltip-header strong {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
}

.calendar-day-tooltip-header span {
    color: #6427d4;
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}

.calendar-day-tooltip-list {
    display: grid;
    gap: 9px;
    max-height: 250px;
    overflow: auto;
    padding-top: 9px;
}

.calendar-day-tooltip-item {
    display: grid;
    gap: 3px;
    padding-left: 9px;
    border-left: 3px solid #6d37df;
}

.calendar-day-tooltip-item strong {
    color: var(--ink);
    font-size: .78rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.calendar-day-tooltip-item span,
.calendar-day-tooltip-item small {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.calendar-empty-dot {
    width: 5px;
    height: 5px;
    margin: 4px auto 0;
    border-radius: 50%;
    background: #d8e1f2;
}

.service-day-note {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #f4d27b;
    border-radius: 999px;
    color: #704f00;
    background: #fff8dc;
    font-size: .68rem;
    font-weight: 900;
}

.church-record-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.calendar-month-group {
    display: grid;
    gap: 10px;
}

.calendar-month-group h3 {
    margin: 0;
    padding: 0 2px;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 900;
}

.church-record-item {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fff;
}

.church-record-item > form:last-child {
    justify-self: end;
}

.church-finance-card {
    display: grid;
    gap: 14px;
    min-height: auto;
}

.church-finance-workspace {
    display: grid;
    gap: 14px;
}

.church-users-workspace {
    display: grid;
    gap: 14px;
}

.church-users-card {
    min-height: auto;
}

.church-users-table td {
    vertical-align: top;
}

.church-users-table td > strong,
.church-users-table td > small {
    display: block;
}

.church-users-table td > small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.church-user-inline-form {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(140px, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.church-user-inline-form select,
.church-user-inline-form input {
    min-height: 36px;
    border: 1px solid #ccd6ea;
    border-radius: var(--radius);
    padding: 0 10px;
    color: var(--ink);
    background: #fff;
    font-size: .78rem;
    font-weight: 800;
}

.church-finance-hero {
    display: grid;
    gap: 12px;
}

.finance-overview-grid {
    display: grid;
    gap: 14px;
}

.finance-table-card {
    min-height: auto;
    overflow: visible;
}

.finance-action-stack {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.finance-action-stack small {
    max-width: 260px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
}

.primary-admin-button.disabled-action,
.primary-admin-button:disabled {
    cursor: not-allowed;
    color: #7b87a1;
    background: #eef2f8;
    box-shadow: none;
    opacity: 1;
}

.finance-table {
    min-width: 780px;
}

.finance-table.compact {
    min-width: 560px;
}

.finance-table td strong {
    color: var(--ink);
}

.finance-breakdown-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.finance-breakdown-tables h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.finance-summary-grid {
    margin-bottom: 2px;
}

.finance-chart-card {
    display: grid;
    gap: 14px;
}

.finance-chart-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 3px;
    border: 1px solid #dfe7f6;
    border-radius: var(--radius);
    background: #fbfcff;
}

.finance-chart-tabs a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 7px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
}

.finance-chart-tabs a.active {
    color: #3415bf;
    background: #f1edff;
}

.finance-chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.finance-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.finance-chart-legend i {
    width: 11px;
    height: 11px;
    border-radius: 3px;
}

.finance-chart-legend i.income,
.finance-chart-bar.income {
    background: #16a34a;
}

.finance-chart-legend i.expense,
.finance-chart-bar.expense {
    background: #f97316;
}

.finance-chart-list {
    display: grid;
    gap: 9px;
}

.finance-chart-row {
    display: grid;
    grid-template-columns: 48px minmax(180px, 1fr) minmax(190px, .42fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #edf1fa;
    border-radius: var(--radius);
    background: #fff;
}

.finance-chart-label {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
}

.finance-chart-bars {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.finance-chart-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f9;
}

.finance-chart-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.finance-chart-values {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.finance-chart-values strong {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.finance-chart-values small {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.finance-rollup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.finance-rollup-grid div {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce6f6;
    border-radius: var(--radius);
    background: #fbfcff;
}

.finance-rollup-grid span,
.finance-breakdown-panel h3 {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.finance-rollup-grid strong {
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.finance-rollup-grid small,
.finance-breakdown-panel small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.finance-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.finance-breakdown-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
}

.finance-breakdown-panel .setup-list div {
    display: grid;
    align-items: start;
    gap: 5px;
}

.finance-entry-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.finance-submit-form {
    display: flex;
    justify-content: flex-end;
}

.finance-budget-header {
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid #e8eef8;
}

.church-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.church-readonly-grid div,
.church-readonly-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.church-readonly-grid span,
.church-readonly-item span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.church-readonly-grid strong,
.church-readonly-item strong {
    color: var(--ink);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.church-readonly-item p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.church-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.church-document-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #dbe4f3;
    border-radius: var(--radius);
    background: #fff;
}

.church-document-card h3 {
    margin: 8px 0 4px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.church-document-card p,
.church-document-meta {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.church-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.church-document-meta span {
    padding: 5px 8px;
    border: 1px solid #e0e8f5;
    border-radius: 999px;
    background: #f8fbff;
}

.ministry-events-form {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dbe4f3;
    border-radius: var(--radius);
    background: #f8fbff;
}

.ministry-events-form-header strong,
.ministry-events-form-header span {
    display: block;
}

.ministry-events-form-header strong {
    color: var(--ink);
    font-size: .95rem;
    font-weight: 900;
}

.ministry-events-form-header span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.4;
}

.ministry-event-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe4f3;
    border-radius: var(--radius);
    background: #fff;
}

.ministry-event-row + .ministry-event-row {
    border-top-color: #c9d8ee;
}

.ministry-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.ministry-detail-list div {
    padding: 10px 12px;
    border: 1px solid #dbe4f3;
    border-radius: var(--radius);
    background: #f8fbff;
}

.ministry-detail-list dt {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ministry-detail-list dd {
    margin: 4px 0 0;
    color: var(--ink);
    font-weight: 900;
}

.event-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.event-mandatory-badge,
.event-scope-badge,
.event-repeat-badge,
.event-type-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
}

.event-mandatory-badge {
    color: #9f1239;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.event-scope-badge {
    color: #155e75;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
}

.event-repeat-badge {
    color: #365314;
    background: #f7fee7;
    border: 1px solid #d9f99d;
}

.event-type-badge {
    color: #3730a3;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

.church-inline-form {
    display: grid;
    grid-template-columns: 90px 130px minmax(130px, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
}

.church-inline-form textarea,
.church-inline-form button,
.church-inline-form .compact-check {
    grid-column: 1 / -1;
}

.church-inline-form button {
    justify-self: end;
}

.text-button {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    font-weight: 800;
    cursor: pointer;
}

.danger-link.text-button {
    border-color: #ffd2d2;
    color: #c92525;
    background: #fff8f8;
}

.danger-link.text-button:hover,
.danger-link.text-button:focus-visible {
    background: #fff1f1;
    outline: 0;
}

.year-filter-form,
.calendar-filter-form {
    display: inline-flex;
    align-items: end;
    gap: 10px;
}

.year-filter-form label,
.calendar-filter-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.year-filter-form input,
.calendar-filter-form input,
.calendar-filter-form select {
    width: 110px;
    min-height: 38px;
    border: 1px solid #ccd6ea;
    border-radius: var(--radius);
    padding: 0 12px;
    color: var(--ink);
    background: #fff;
}

.calendar-filter-form select {
    width: 140px;
}

.calendar-filter-form .calendar-search-label,
.calendar-filter-form .calendar-church-select {
    flex: 1 1 240px;
}

.calendar-filter-form .calendar-search-label input,
.calendar-filter-form .calendar-church-select select {
    width: 100%;
}

.calendar-clear-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.church-calendar-toolbar,
.calendar-nav-actions {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.church-calendar-toolbar {
    margin: -4px 0 16px;
}

.calendar-view-shell .church-calendar-toolbar,
.church-year-plan-view-shell .church-calendar-toolbar {
    order: 2;
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #edf1fa;
}

.calendar-nav-actions {
    justify-content: flex-end;
}

.church-calendar-toolbar .secondary-link,
.calendar-nav-actions .secondary-link {
    min-height: 38px;
}

.church-calendar-board {
    margin-top: 14px;
}

.calendar-view-shell .church-calendar-board,
.church-year-plan-view-shell .church-calendar-board {
    order: 3;
    margin-top: 0;
}

.church-calendar-view-shell [data-admin-event-form] {
    order: 4;
    margin: 14px 16px 0;
}

.calendar-view-shell .church-record-list,
.church-year-plan-view-shell .church-year-calendar-card .church-record-list {
    order: 5;
    padding: 0 16px 16px;
}

.church-dashboard-calendar-preview {
    min-height: auto;
}

.church-dashboard-calendar-preview .calendar-planner-shell {
    padding-top: 2px;
}

.church-dashboard-calendar-preview .calendar-day-cell {
    min-height: 116px;
}

.church-dashboard-calendar-preview .calendar-event-pill .event-meta-row {
    display: none;
}

.calendar-mobile-nav {
    display: none;
}

.church-overview-list {
    display: grid;
    gap: 14px;
}

.church-overview-card {
    min-height: auto;
}

.church-overview-card .card-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.church-overview-card .card-header > span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.church-overview-grid {
    display: grid;
    grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
    gap: 14px;
}

.church-overview-grid > section {
    display: grid;
    gap: 10px;
    min-width: 0;
    align-content: start;
}

.church-overview-grid h3 {
    margin: 0;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 900;
}

.stack-list {
    display: grid;
    gap: 10px;
}

.stack-list form {
    padding: 10px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fff;
}

.stack-list span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.stack-list button {
    min-height: 38px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    background: #3415bf;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.stack-list button[value="DELETE"] {
    background: #c92525;
}

.registration-public-shell {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0;
    display: grid;
    gap: 16px;
}

.registration-resume-card {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
    gap: 14px;
    align-items: center;
    min-height: auto;
    padding: 12px;
}

.registration-resume-card p,
.registration-resume-card h2,
.registration-resume-card span {
    margin: 0;
}

.registration-resume-card p {
    color: var(--purple);
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.registration-resume-card h2 {
    margin-top: 2px;
    color: var(--ink);
    font-size: .94rem;
    line-height: 1.2;
}

.registration-resume-card span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.3;
}

.registration-resume-card form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.compact-action {
    min-height: 38px;
    padding-inline: 14px;
    font-size: .78rem;
    white-space: nowrap;
}

.registration-resume-card .admin-field {
    gap: 5px;
}

.registration-resume-card .admin-field input {
    min-height: 38px;
    font-size: .82rem;
}

.registration-progress {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e4ebf7;
    border-radius: var(--radius);
    background: #fff;
}

.registration-progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.registration-progress span,
.registration-progress strong {
    font-size: .76rem;
    font-weight: 900;
}

.registration-progress span {
    color: var(--muted);
}

.registration-progress strong {
    color: var(--ink);
}

.registration-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2fb;
}

.registration-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
    transition: width .2s ease;
}

.form-section-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.form-section-card h2,
.form-section-card h3 {
    margin: 0;
    color: var(--ink);
    line-height: 1.2;
}

.form-section-card h2 {
    font-size: 1rem;
}

.form-section-card h3 {
    padding-top: 6px;
    color: var(--muted);
    font-size: .86rem;
    text-transform: uppercase;
}

.registration-stepper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.registration-stepper button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    padding: 0 12px;
    color: #3415bf;
    background: #fff;
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
    scroll-snap-align: start;
    cursor: pointer;
}

.registration-stepper button span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #7a65de;
    font-size: .72rem;
}

.registration-stepper button.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
}

.registration-stepper button.active span {
    color: #3415bf;
    background: #fff;
}

.stepper-ready .registration-step-panel[hidden],
.stepper-ready [hidden] {
    display: none;
}

.stepper-ready .form-actions {
    display: none;
}

.stepper-ready.is-last-step .form-actions {
    display: flex;
}

.step-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.repeatable-block {
    display: grid;
    gap: 12px;
}

.repeatable-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.repeatable-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.repeatable-rows {
    display: grid;
    gap: 12px;
}

.repeatable-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #e1e8f5;
    border-radius: var(--radius);
    background: #fff;
}

.reference-repeatable-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.icon-remove-row {
    width: 38px;
    height: 38px;
    border: 1px solid #f0c7c7;
    border-radius: var(--radius);
    color: #c92525;
    background: #fff7f7;
    font-weight: 800;
    cursor: pointer;
}

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.attachment-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 86px;
    padding: 14px;
    border: 1px solid #e1e8f5;
    border-radius: var(--radius);
    background: #fff;
}

.attachment-field strong,
.attachment-field small {
    display: block;
}

.attachment-field strong {
    font-size: .86rem;
}

.attachment-field small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.attachment-field input[type="file"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    padding: 8px;
    border: 1px solid #ccd6ea;
    border-radius: var(--radius);
    background: #fbfcff;
    color: var(--ink);
}

.budget-upload-field {
    align-self: stretch;
}

.upload-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 78px;
    padding: 14px;
    border: 1px solid #e1e8f5;
    border-radius: var(--radius);
    background: #fff;
}

.upload-control strong,
.upload-control small {
    display: block;
}

.upload-control strong {
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.upload-control small {
    margin-top: 4px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
}

.upload-button {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(90deg, #7437df, #5c2bd1);
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}

.upload-button input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.form-grid-span {
    grid-column: 1 / -1;
}

.status-filter select {
    min-height: 38px;
    border: 1px solid #d8e1f2;
    border-radius: var(--radius);
    padding: 0 12px;
    color: var(--ink);
    background: #fff;
    font-size: .82rem;
    font-weight: 800;
}

.approval-card {
    min-height: auto;
    display: grid;
    gap: 14px;
}

.approval-card-bottom {
    border-color: #cfd9ef;
    background: linear-gradient(180deg, #fff, #fbfcff);
}

.approval-card-bottom textarea {
    min-height: 118px;
}

.approval-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.review-decision-actions {
    padding-top: 4px;
    border-top: 1px solid #edf2fb;
}

.danger-link {
    color: #c92525;
}

.detail-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-list-card {
    min-height: auto;
}

.detail-list-card dl {
    margin: 0;
    display: grid;
    gap: 10px;
}

.detail-list-card dl div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e8eef8;
    border-radius: var(--radius);
    background: #fbfcff;
}

.detail-list-card dt {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.detail-list-card dd {
    margin: 0;
    color: var(--ink);
    font-size: .86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.attachment-action-row,
.attachment-action-row > span {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.attachment-action-row {
    justify-content: space-between;
}

.attachment-action-row strong {
    min-width: 160px;
    flex: 1 1 180px;
    font-size: .84rem;
}

.attachment-action-row a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #d8e1f2;
    border-radius: 8px;
    color: #130f99;
    background: #fff;
    font-size: .76rem;
    font-weight: 900;
    text-decoration: none;
}

.attachment-action-row a:first-child {
    color: #fff;
    border-color: #6d37df;
    background: #6d37df;
}

@media (max-width: 1280px) {
    .auth-shell {
        width: min(920px, calc(100vw - 32px));
    }

    .auth-card {
        grid-template-columns: 1fr 1fr;
    }

    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 18px;
    }

    .module-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }

    .church-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .church-home-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .church-home-analytics-grid {
        grid-template-columns: 1fr;
    }

    .church-home-donut-wrap {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .admin-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-growth-dashboard .admin-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-growth-dashboard .admin-dashboard-filter-form {
        grid-template-columns: repeat(2, minmax(150px, 1fr)) auto auto;
    }
}

@media (max-width: 1100px) {
    .calendar-planner-shell {
        grid-template-columns: 1fr;
    }

    .calendar-side-panel {
        grid-template-columns: minmax(210px, .85fr) minmax(240px, 1fr);
    }
}

@media (max-width: 980px) {
    .auth-shell {
        justify-content: flex-start;
        padding-top: 16px;
    }

    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel,
    .login-panel {
        min-height: auto;
    }

    .brand-overlay {
        padding: 38px 28px;
    }

    .login-panel {
        padding: 92px 28px 42px;
    }

    .dashboard-shell,
    .church-dashboard-shell,
    .dashboard-shell.sidebar-collapsed,
    .church-dashboard-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 10;
        inset: 0 auto 0 0;
        width: 250px;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .sidebar-collapsed .sidebar {
        padding: 28px 18px;
    }

    .sidebar-collapsed .sidebar-head {
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 30px;
    }

    .sidebar-collapsed .sidebar-brand {
        justify-content: flex-start;
        flex: 1;
        margin: 0 0 0 8px;
    }

    .sidebar-collapsed .sidebar-brand-text,
    .sidebar-collapsed .side-nav-label,
    .sidebar-collapsed .side-nav-badge {
        display: initial;
    }

    .sidebar-collapsed .side-nav-caret {
        display: inline-grid;
    }

    .sidebar-collapsed .side-nav-children {
        display: grid;
    }

    .sidebar-collapsed .brand-mark.small {
        grid-template-columns: repeat(2, 18px);
        grid-template-rows: repeat(2, 18px);
        width: 41px;
        height: 41px;
    }

    .sidebar-collapsed .side-nav a {
        justify-content: flex-start;
        min-height: 44px;
        padding: 0 12px;
    }

    .sidebar-collapsed .side-nav-parent {
        justify-content: flex-start;
        min-height: 44px;
        padding: 0 12px;
    }

    .sidebar-collapsed .side-nav-badge {
        display: inline-block;
    }

    .sidebar-collapsed .sidebar-collapse-button {
        position: static;
        width: 34px;
        height: 34px;
        transform: none;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-button {
        display: inline-grid;
    }

    .reference-band,
    .stats-grid,
    .dashboard-filter-card,
    .dashboard-filter-form,
    .dashboard-chart-grid,
    .dashboard-signal-grid,
    .dashboard-feature-grid,
    .dashboard-quick-grid,
    .analytics-grid.admin-compact-grid,
    .finance-rollup-grid,
    .finance-breakdown-grid,
    .account-grid,
    .account-access-grid,
    .report-card-grid,
    .approval-flow,
    .detail-section-grid,
    .form-grid,
    .user-detail-card {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-chart-grid .chart-panel,
    .dashboard-chart-grid .pie-panel,
    .dashboard-chart-grid .bars-panel.lead,
    .dashboard-chart-grid .bars-panel.wide,
    .dashboard-chart-grid .actions-panel,
    .analytics-grid.admin-compact-grid .panel-card {
        grid-column: span 2;
    }

    .admin-growth-dashboard .dashboard-filter-card,
    .admin-growth-dashboard .admin-dashboard-filter-form {
        grid-template-columns: 1fr;
    }

    .role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-admin-form,
    .stack-list form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .church-workspace-grid {
        grid-template-columns: 1fr;
    }

    .church-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-chart-row {
        grid-template-columns: 44px minmax(160px, 1fr);
    }

    .finance-chart-values {
        grid-column: 2;
    }

    .church-overview-grid {
        grid-template-columns: 1fr;
    }

    .church-inline-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hierarchy-filter-form,
    .report-filter-form,
    .map-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-preview-layout {
        grid-template-columns: 1fr;
    }

    .map-count-grid {
        grid-template-columns: 1fr;
    }

    .map-location-list {
        max-height: none;
    }

    .calendar-event-admin-form,
    .calendar-target-mode,
    .church-selector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .repeatable-row,
    .reference-repeatable-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    }

    .attachment-grid {
        grid-template-columns: 1fr;
    }

    .reference-column + .reference-column {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .reference-band {
        grid-template-columns: 1fr;
    }

    .approval-flow article:not(:last-child)::after {
        display: none;
    }

    .analytics-grid .panel-card:nth-child(n) {
        grid-column: span 12;
    }
}

@media (max-width: 700px) {
    .auth-page {
        overflow-x: hidden;
        background:
            radial-gradient(circle at top right, rgba(109, 55, 223, .12), transparent 16rem),
            linear-gradient(180deg, #eef3fb 0%, #ffffff 46%);
    }

    .auth-shell {
        width: 100%;
        min-height: 100svh;
        padding: 0;
        justify-content: flex-start;
        gap: 0;
    }

    .auth-card {
        width: 100%;
        min-height: auto;
        display: block;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .auth-brand-panel {
        display: none;
    }

    .login-panel {
        width: 100%;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        padding: 10px 10px 16px;
        background: transparent;
    }

    .mobile-login-top {
        width: 100%;
        max-width: 320px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin: 0 auto 10px;
    }

    .mobile-login-brand {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--ink);
    }

    .mobile-login-brand .brand-mark {
        grid-template-columns: repeat(2, 12px);
        grid-template-rows: repeat(2, 12px);
        gap: 4px;
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
    }

    .mobile-login-brand .brand-mark span {
        background: var(--purple);
    }

    .mobile-login-brand .brand-mark::after {
        inset: 8px;
        background: #fff;
    }

    .mobile-login-brand strong,
    .mobile-login-brand small {
        display: block;
        white-space: nowrap;
    }

    .mobile-login-brand strong {
        font-size: .84rem;
        line-height: 1;
    }

    .mobile-login-brand small {
        max-width: 185px;
        margin-top: 3px;
        overflow: hidden;
        color: var(--muted);
        font-size: .64rem;
        font-weight: 700;
        text-overflow: ellipsis;
    }

    .login-form {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding: 16px 12px 14px;
        border: 1px solid #dfe6f4;
        border-radius: 14px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 18px 44px rgba(9, 24, 68, .10);
    }

    .form-heading h2 {
        font-size: 1.42rem;
        line-height: 1.15;
    }

    .form-heading p {
        margin: 7px auto 16px;
        font-size: .82rem;
        line-height: 1.4;
    }

    .field-group {
        gap: 6px;
        margin-bottom: 10px;
        font-size: .76rem;
    }

    .field-control,
    .primary-action,
    .google-action {
        height: 38px;
        border-radius: 8px;
    }

    .field-control {
        background: #fbfcff;
    }

    .field-control input {
        font-size: .78rem;
    }

    .field-control input::placeholder {
        font-size: .76rem;
    }

    .password-toggle {
        width: auto;
        min-width: 48px;
        height: 28px;
        margin-right: 6px;
        flex: 0 0 auto;
        font-size: .74rem;
    }

    .form-row {
        align-items: center;
        justify-content: space-between;
        gap: 10px 14px;
        margin: 2px 0 14px;
        font-size: .76rem;
    }

    .form-row a {
        white-space: nowrap;
    }

    .remember-control {
        gap: 10px;
    }

    .remember-control span {
        width: 16px;
        height: 16px;
        flex: 0 0 auto;
    }

    .remember-control span::after {
        left: 4px;
        top: 2px;
        width: 5px;
        height: 8px;
    }

    .primary-action,
    .google-action {
        gap: 8px;
        font-size: .82rem;
    }

    .request-access-action {
        min-height: 40px;
        font-size: .82rem;
    }

    .divider {
        gap: 18px;
        margin: 16px 0;
    }

    .admin-note {
        margin-top: 12px;
        font-size: .74rem;
    }

    .mission-grid,
    .stats-grid,
    .church-home-kpi-grid,
    .church-home-analytics-grid,
    .church-home-donut-wrap,
    .church-home-bar-list,
    .dashboard-signal-grid,
    .dashboard-feature-grid,
    .finance-rollup-grid,
    .finance-breakdown-grid,
    .account-grid,
    .account-access-grid,
    .report-card-grid,
    .approval-flow,
    .module-grid,
    .detail-section-grid,
    .form-grid,
    .role-grid,
    .user-detail-card,
    .summary-grid,
    .church-readonly-grid,
    .church-document-grid,
    .church-registration-details,
    .gps-lookup-grid,
    .repeatable-row,
    .reference-repeatable-row,
    .compact-admin-form,
    .church-inline-form,
    .stack-list form {
        grid-template-columns: 1fr;
    }

    .calendar-event-admin-form,
    .calendar-target-mode,
    .hierarchy-filter-form,
    .report-filter-form,
    .map-filter-form,
    .church-selector-grid {
        grid-template-columns: 1fr;
    }

    .finance-chart-card .card-header,
    .finance-chart-tabs {
        width: 100%;
    }

    .finance-chart-tabs a {
        flex: 1 1 0;
    }

    .finance-chart-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .church-home-kpi {
        min-height: 132px;
    }

    .church-home-bar-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .church-home-bar-row strong {
        text-align: left;
    }

    .church-home-donut {
        width: min(170px, 72vw);
    }

    .finance-chart-values {
        grid-column: auto;
    }

    .finance-action-stack {
        justify-items: stretch;
        width: 100%;
    }

    .finance-action-stack small {
        max-width: none;
        text-align: left;
    }

    .registration-public-shell {
        width: 100%;
        padding: 10px;
        gap: 10px;
    }

    .registration-public-shell .dashboard-title-row {
        gap: 10px;
        padding: 12px;
    }

    .registration-public-shell .dashboard-title-row h1 {
        font-size: 1.14rem;
    }

    .registration-public-shell .dashboard-title-actions,
    .registration-public-shell .dashboard-title-actions > * {
        width: 100%;
    }

    .registration-public-shell > .panel-card.admin-form {
        gap: 14px;
        padding: 10px;
        overflow: hidden;
    }

    .registration-resume-card,
    .registration-resume-card form {
        grid-template-columns: 1fr;
    }

    .registration-resume-card {
        gap: 10px;
        padding: 10px;
    }

    .compact-action {
        width: 100%;
    }

    .registration-progress {
        padding: 10px;
    }

    .registration-progress > div:first-child {
        gap: 4px;
    }

    .registration-progress span,
    .registration-progress strong {
        width: 100%;
    }

    .registration-stepper {
        width: 100%;
        margin: 0;
        padding: 2px 0 8px;
    }

    .registration-stepper button {
        min-height: 36px;
        gap: 6px;
        padding: 0 9px;
        font-size: .72rem;
    }

    .registration-stepper button span {
        width: 20px;
        height: 20px;
        font-size: .68rem;
    }

    .form-section-card {
        gap: 12px;
        padding: 12px;
    }

    .form-section-card h2 {
        font-size: .96rem;
    }

    .repeatable-row {
        align-items: stretch;
        padding: 12px;
    }

    .repeatable-heading {
        align-items: stretch;
    }

    .repeatable-heading .secondary-link {
        width: 100%;
        justify-content: center;
    }

    .attachment-field {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .upload-control {
        grid-template-columns: 1fr;
        align-items: stretch;
        padding: 12px;
    }

    .upload-button,
    .upload-control .secondary-link {
        width: 100%;
    }

    .icon-remove-row {
        width: 100%;
    }

    .step-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .step-form-actions .secondary-link,
    .step-form-actions .primary-admin-button,
    .stepper-ready.is-last-step .form-actions > * {
        width: 100%;
        justify-content: center;
    }

    .stepper-ready.is-last-step .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-row,
    .auth-footer {
        flex-wrap: wrap;
    }

    .auth-footer {
        gap: 8px 16px;
        padding: 0 18px 18px;
        text-align: center;
        font-size: .78rem;
    }

    .topbar {
        height: auto;
        min-height: 72px;
        flex-wrap: wrap;
        padding: 14px;
    }

    .search-field {
        order: 3;
        width: 100%;
    }

    .year-filter-form,
    .calendar-filter-form {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .church-calendar-toolbar,
    .calendar-nav-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-nav-actions {
        width: 100%;
    }

    .calendar-planner-shell,
    .calendar-side-panel {
        grid-template-columns: 1fr;
    }

    .calendar-main-panel {
        display: none;
    }

    .mini-calendar-card,
    .calendar-upcoming-card {
        padding: 12px;
    }

    .mini-calendar-day,
    .mini-calendar-weekday {
        min-height: 32px;
    }

    .year-filter-form label,
    .calendar-filter-form label {
        flex: 1 1 140px;
    }

    .year-filter-form input,
    .year-filter-form .primary-admin-button,
    .calendar-filter-form input,
    .calendar-filter-form select,
    .calendar-filter-form .calendar-clear-link,
    .calendar-filter-form .secondary-link,
    .calendar-nav-actions .secondary-link,
    .calendar-filter-form .primary-admin-button {
        width: 100%;
    }

    .year-filter-form .primary-admin-button,
    .calendar-filter-form .primary-admin-button {
        flex: 1 1 120px;
    }

    .topbar-actions {
        gap: 10px;
    }

    .account-menu-toggle {
        min-height: 42px;
        padding-right: 8px;
    }

    .account-summary {
        display: none;
    }

    .account-avatar {
        width: 36px;
        height: 36px;
    }

    .dashboard-content {
        padding: 14px;
    }

    .dashboard-feature-card {
        min-height: auto;
    }

    .dashboard-filter-card,
    .dashboard-filter-form,
    .admin-kpi-grid,
    .dashboard-chart-grid,
    .dashboard-quick-grid,
    .analytics-grid.admin-compact-grid {
        grid-template-columns: 1fr;
    }

    .admin-growth-dashboard {
        padding: 12px;
    }

    .admin-growth-dashboard .admin-kpi-grid,
    .admin-growth-dashboard .dashboard-quick-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-grid .chart-panel,
    .dashboard-chart-grid .pie-panel,
    .dashboard-chart-grid .bars-panel.lead,
    .dashboard-chart-grid .bars-panel.wide,
    .dashboard-chart-grid .actions-panel,
    .analytics-grid.admin-compact-grid .panel-card {
        grid-column: span 1;
    }

    .coverage-row,
    .coverage-row.compact {
        grid-template-columns: 1fr auto;
    }

    .coverage-bar {
        grid-column: 1 / -1;
    }

    .church-kpi-grid {
        grid-template-columns: 1fr;
    }

    .calendar-view-shell .topbar {
        min-height: 58px;
        justify-content: space-between;
        padding: 0 14px;
        border: 0;
        color: #fff;
        background: linear-gradient(90deg, #351183, #210b5e);
        border-radius: 0 0 14px 14px;
    }

    .calendar-view-shell .topbar::before {
        content: "Calendar";
        position: absolute;
        left: 50%;
        color: #fff;
        font-size: .92rem;
        font-weight: 900;
        transform: translateX(-50%);
    }

    .calendar-view-shell .menu-button,
    .calendar-view-shell .notification-button {
        display: inline-grid;
        color: #fff;
        background: transparent;
    }

    .calendar-view-shell .topbar-actions {
        margin-left: auto;
    }

    .calendar-view-shell .account-menu-toggle {
        border-color: transparent;
        color: #fff;
        background: transparent;
    }

    .calendar-view-shell .account-menu-toggle:hover,
    .calendar-view-shell .account-menu-toggle:focus-visible,
    .calendar-view-shell .account-menu.open .account-menu-toggle {
        border-color: rgba(255, 255, 255, .25);
        background: rgba(255, 255, 255, .1);
    }

    .calendar-view-shell .account-menu-chevron {
        display: none;
    }

    .calendar-view-shell .dashboard-content {
        padding: 12px 10px 88px;
    }

    .calendar-view-shell .dashboard-title-row {
        display: none;
    }

    .calendar-view-shell .calendar-board-card,
    .church-calendar-view-shell .church-module-card#church-calendar,
    .church-year-plan-view-shell .church-module-card#church-calendar {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .calendar-view-shell .calendar-board-card > .card-header,
    .church-calendar-view-shell .church-module-card#church-calendar > .card-header,
    .church-year-plan-view-shell .church-module-card#church-calendar > .card-header {
        padding: 12px 2px 8px;
        border: 0;
    }

    .church-year-plan-view-shell .church-year-plan-summary-card .card-header,
    .church-year-plan-view-shell .church-card-actions {
        align-items: stretch;
        width: 100%;
    }

    .church-year-plan-view-shell .church-card-actions > * {
        flex: 1 1 150px;
        justify-content: center;
    }

    .calendar-view-shell .card-header p,
    .calendar-view-tabs,
    .calendar-header-actions .primary-admin-button {
        display: none;
    }

    .calendar-view-shell .card-header h2 {
        font-size: 1rem;
    }

    .calendar-view-shell .calendar-planner-shell,
    .church-year-plan-view-shell .calendar-planner-shell {
        padding: 0;
    }

    .calendar-view-shell .church-calendar-toolbar,
    .church-year-plan-view-shell .church-calendar-toolbar {
        padding: 0 0 10px;
        border: 0;
    }

    .calendar-view-shell .calendar-filter-form,
    .church-year-plan-view-shell .calendar-filter-form {
        gap: 8px;
        padding: 10px;
        border: 1px solid #edf1fa;
        border-radius: 10px;
        background: #fff;
    }

    .calendar-view-shell .calendar-nav-actions,
    .church-year-plan-view-shell .calendar-nav-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .calendar-view-shell .church-record-list,
    .church-year-plan-view-shell .church-year-calendar-card .church-record-list {
        padding: 0;
    }

    .calendar-mobile-nav {
        position: fixed;
        z-index: 8;
        right: 12px;
        bottom: 10px;
        left: 12px;
        min-height: 62px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        gap: 6px;
        padding: 8px 10px;
        border: 1px solid #e7eaf4;
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 18px 46px rgba(18, 27, 56, .16);
        backdrop-filter: blur(14px);
    }

    .calendar-mobile-nav a,
    .calendar-mobile-nav button {
        min-width: 0;
        display: grid;
        place-items: center;
        gap: 3px;
        border: 0;
        color: #68748d;
        background: transparent;
        font-size: .62rem;
        font-weight: 900;
        cursor: pointer;
    }

    .calendar-mobile-nav svg {
        width: 17px;
        height: 17px;
        display: block;
    }

    .calendar-mobile-nav .active {
        color: #6d37df;
    }

    .calendar-mobile-nav .calendar-mobile-add {
        width: 42px;
        height: 42px;
        justify-self: center;
        border-radius: 50%;
        color: #fff;
        background: linear-gradient(180deg, #7c3df0, #5d24d1);
        box-shadow: 0 10px 22px rgba(109, 55, 223, .28);
        font-size: 1.55rem;
        line-height: 1;
    }

    .dashboard-title-row {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .section-heading > span {
        align-self: flex-start;
    }

    .dashboard-title-row h1 {
        font-size: 1.25rem;
        overflow-wrap: anywhere;
    }

    .dashboard-title-actions {
        justify-content: flex-start;
    }

    .panel-card {
        min-height: auto;
        padding: 14px;
    }

    .card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 14px;
    }

    .map-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .map-header-actions .secondary-link {
        flex: 1 1 150px;
        justify-content: center;
    }

    .church-overview-card .card-header > span,
    .church-overview-card .card-header p {
        overflow-wrap: anywhere;
    }

    .compact-admin-form,
    .church-inline-form {
        gap: 12px;
        padding: 12px;
    }

    .compact-admin-form label,
    .church-inline-form label {
        display: grid;
        gap: 6px;
        align-items: stretch;
    }

    .compact-admin-form input,
    .compact-admin-form select,
    .compact-admin-form textarea,
    .church-inline-form input,
    .church-inline-form select,
    .church-inline-form textarea {
        min-height: 44px;
        font-size: .9rem;
    }

    .ministry-event-row,
    .ministry-detail-list {
        grid-template-columns: 1fr;
    }

    .compact-admin-form button,
    .church-inline-form button,
    .hierarchy-filter-form .primary-admin-button,
    .hierarchy-filter-form .secondary-link,
    .report-filter-form .primary-admin-button,
    .map-filter-form .primary-admin-button,
    .church-record-item > form .text-button {
        width: 100%;
        justify-self: stretch;
        min-height: 42px;
    }

    .finance-entry-item,
    .finance-submit-form,
    .church-user-inline-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .church-map-shell,
    .church-map-canvas {
        min-height: 420px;
    }

    .map-legend {
        right: 10px;
        bottom: 22px;
        left: 10px;
        width: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
    }

    .map-legend-title {
        grid-column: 1 / -1;
    }

    .map-legend-item {
        gap: 7px;
    }

    .map-legend-item small {
        display: none;
    }

    .marker-tooltip {
        display: none;
    }

    .admin-modal-backdrop {
        align-items: start;
        padding: 12px;
    }

    .admin-modal {
        max-height: calc(100dvh - 24px);
        padding: 0;
    }

    .admin-modal-header {
        padding: 14px;
    }

    .admin-modal .compact-admin-form {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .admin-modal.compact form {
        padding: 14px;
    }

    .admin-modal.compact .modal-copy {
        margin: 14px 14px 0;
    }

    .modal-actions > * {
        width: 100%;
        justify-content: center;
    }

    .church-record-item > form .text-button {
        border: 1px solid #ffd2d2;
        border-radius: var(--radius);
        background: #fff8f8;
    }

    .calendar-month-group {
        gap: 8px;
    }

    .church-readonly-grid div,
    .church-readonly-item {
        padding: 10px;
    }

    .calendar-weekdays {
        display: none;
    }

    .calendar-month-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day-cell {
        min-height: auto;
    }

    .calendar-day-badges {
        justify-content: flex-start;
    }

    .calendar-day-cell.muted-day {
        display: none;
    }

    .calendar-empty-dot {
        display: none;
    }

    .pagination-row nav > div:first-child {
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .pagination-row nav > div:first-child a,
    .pagination-row nav > div:first-child span {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 13px;
        border: 1px solid #d8e1f2;
        border-radius: var(--radius);
        background: #fff;
        color: #3415bf;
        font-size: .82rem;
        font-weight: 800;
    }

    .pagination-row nav > div:first-child span {
        color: #94a1ba;
        background: #f8faff;
    }

    .pagination-row nav > div:last-child {
        display: none;
    }

    .donut-wrap,
    .donut-wrap.approvals {
        flex-direction: column;
        align-items: stretch;
    }

    .donut-chart {
        margin: 0 auto;
    }

    .registration-list div {
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .registration-list time {
        display: none;
    }
}

@media (max-width: 380px) {
    .login-panel {
        padding: 12px 12px 18px;
    }

    .mobile-login-top {
        margin-bottom: 12px;
    }

    .mobile-login-brand small {
        max-width: 145px;
    }

    .login-form {
        padding: 20px 14px 18px;
        border-radius: 14px;
    }

    .form-heading h2 {
        font-size: 1.38rem;
    }

    .form-heading p,
    .field-control input,
    .field-control input::placeholder {
        font-size: .84rem;
    }

    .form-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    .dashboard-shell {
        display: block;
        min-height: auto;
        background: #fff;
    }

    .sidebar,
    .topbar,
    .dashboard-title-row,
    .stats-grid,
    .panel-card.admin-table-card,
    .map-count-grid,
    .district-coverage-panel,
    .map-location-list,
    .map-header-actions {
        display: none !important;
    }

    .main-panel,
    .dashboard-content,
    .map-preview-layout,
    .map-main-stack {
        display: block;
        padding: 0;
    }

    .panel-card.map-preview-card {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .church-map-shell {
        min-height: 720px;
        border-color: #cbd5e1;
        break-inside: avoid;
    }
}

.health-response-panel {
    border: 1px solid #d8e1f2;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.health-response-panel + .health-response-panel {
    margin-top: 12px;
}

.health-response-panel summary {
    cursor: pointer;
    list-style-position: inside;
}

.health-response-panel > p {
    margin: 10px 0 14px;
    color: var(--muted);
}

.respondent-assignment-list {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
    padding-right: 4px;
}

.respondent-assignment-row {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) minmax(160px, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid #d8e1f2;
    border-radius: 8px;
    background: #fff;
}

.respondent-assignment-row span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.respondent-assignment-row strong,
.health-response-panel summary strong {
    color: var(--ink);
}

.respondent-assignment-row small,
.health-response-panel summary small {
    color: var(--muted);
}

.health-pillar-review-group {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.health-pillar-review-group h3 {
    margin: 0;
    color: var(--ink);
    font-size: .95rem;
}

.health-response-panel summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 760px) {
    .respondent-assignment-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .respondent-assignment-row input[type="text"] {
        grid-column: 1 / -1;
    }
}

.status-pill.rejected {
    color: #991b1b;
    background: #fee2e2;
}

.notification-button[href] {
    text-decoration: none;
}

.health-pillar-settings-page .dashboard-title-row {
    align-items: center;
}

.health-pillar-settings-page .panel-card {
    min-height: auto;
}

.health-pillar-browser .card-header,
.health-question-panel .card-header {
    align-items: center;
}

.health-pillar-table,
.health-question-table {
    min-width: 980px;
}

.health-pillar-table th:last-child,
.health-pillar-table td:last-child,
.health-question-table th:last-child,
.health-question-table td:last-child {
    width: 160px;
    text-align: right;
}

.health-pillar-settings-page .table-long-copy {
    max-width: 760px;
    color: #334155;
    line-height: 1.45;
    white-space: normal;
}

.health-pillar-table .table-long-copy,
.health-question-table .table-long-copy {
    width: 52%;
}

.health-pillar-settings-page .pagination-row {
    padding-top: 12px;
}

.health-pillar-settings-page .modal-actions {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .health-pillar-settings-page .dashboard-title-row {
        align-items: flex-start;
    }

    .health-pillar-settings-page .dashboard-title-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.health-respondent-table th:last-child,
.health-respondent-table td:last-child {
    width: 180px;
    text-align: right;
}

.respondent-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.respondent-summary-list span {
    display: inline-grid;
    gap: 2px;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid #dfe7f4;
    border-radius: 8px;
    background: #fbfcff;
}

.respondent-summary-list strong {
    color: var(--ink);
    font-size: .82rem;
}

.respondent-summary-list small,
.muted-inline {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.respondent-assignment-modal {
    width: min(1040px, 100%);
}

.respondent-assignment-modal .admin-modal-header p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.respondent-assignment-modal form {
    display: grid;
    gap: 16px;
    padding: 0 20px 20px;
}

.respondent-assignment-table {
    min-width: 920px;
}

.respondent-assignment-table th:first-child,
.respondent-assignment-table td:first-child {
    width: 78px;
    text-align: center;
}

.respondent-assignment-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6d32d9;
}

.respondent-assignment-table input[type="text"] {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cdd8ed;
    border-radius: 8px;
    background: #fbfcff;
    color: var(--ink);
    font: inherit;
}

.respondent-assignment-table input[readonly] {
    color: #64748b;
    background: #f8fafc;
}

.status-pill.available {
    color: #475569;
    background: #eef2f7;
}




.health-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.health-manager-actions {
    border-color: #d9e4f5;
    background: #fbfdff;
}

.health-manager-panel {
    border-top: 3px solid #6d37df;
}
.health-action-panel .card-header {
    align-items: center;
}

.health-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.health-action-card {
    min-height: 128px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px;
    border: 1px solid #dfe7f4;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.health-action-card:hover,
.health-action-card:focus-visible {
    border-color: #b9c8e9;
    box-shadow: 0 16px 34px rgba(17, 24, 65, .1);
    transform: translateY(-1px);
    outline: 0;
}

.health-action-card span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #5b22d6;
    background: #f0eaff;
}

.health-action-card svg {
    width: 18px;
    height: 18px;
}

.health-action-card strong {
    font-size: .94rem;
    line-height: 1.25;
}

.health-action-card small,
.health-respondent-table td > small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
}

.health-response-table {
    min-width: 1120px;
}

@media (max-width: 1100px) {
    .health-workspace-grid,
    .health-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .health-workspace-grid,
    .health-action-grid {
        grid-template-columns: 1fr;
    }
}
