/* Form section header */
.form-section {
    margin-top: 18px;
    margin-bottom: 6px;
    color: var(--brand-strong);
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

/* Helper text for inputs */
.helper-text {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 400;
}

/* Password toggle button */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 32px;
    background: none;
    border: none;
    color: var(--brand-strong);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0 4px;
    font-weight: 700;
}

/* Photo preview styling */
.photo-preview img {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--line);
}
:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --ink: #1e293b;
    --muted: #94a3b8;
    --line: #f1f5f9;
    --brand: #4f46e5;
    --brand-strong: #4338ca;
    --accent: #10b981;
    --accent-soft: #d1fae5;
    --green-soft: #ecfdf5;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    --radius-xl: 24px;
    --radius-2xl: 30px;
    --radius-3xl: 40px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Montserrat', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}
/* Minimalist photo upload */
.photo-upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    cursor: pointer;
}
.photo-upload img {
    border: 2px dashed var(--line);
    background: #f8fafc;
    transition: border-color 0.2s;
}
.photo-upload:hover img {
    border-color: var(--brand);
}

body {
    min-height: 100%;
    margin: 0;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    padding-bottom: 94px;
}

.content {
    width: min(430px, 100%);
    margin: 0 auto;
    padding: 24px 20px 28px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px 10px;
    background: rgba(248, 251, 255, 0.82);
    border-bottom: 1px solid rgba(217, 226, 236, 0.72);
    backdrop-filter: blur(18px);
}

@media (max-width: 719px) {
    .topbar {
        display: none;
    }
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.brand-mark,
.login-emblem,
.church-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), #818cf8);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.brand strong,
.brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand strong {
    font-size: 0.95rem;
}

.brand small,
.muted,
.page-title p,
.hero-panel p,
.profile-hero p,
.member-main small,
.metric-card small,
.detail-item span,
.info-list span {
    color: var(--muted);
}

.avatar-button,
.icon-button,
.person-avatar,
.profile-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 20px;
    border: 1px solid rgba(241, 245, 249, 0.9);
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-strong);
    font-weight: 800;
}

.avatar-button,
.icon-button {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 18px;
}

button.icon-button {
    border: 0;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.28);
    cursor: pointer;
    line-height: 1;
}

.app-icon {
    width: 1.15em;
    height: 1.15em;
}

.login-screen {
    display: grid;
    min-height: calc(100vh - 48px);
    place-items: center;
}

.login-card {
    width: min(430px, 100%);
    padding: 28px 20px;
    border: 1px solid rgba(241, 245, 249, 0.9);
    border-radius: var(--radius-3xl);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-emblem {
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
    font-size: 1.15rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(1.48rem, 6vw, 2.45rem);
    line-height: 1.04;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 12px;
    font-size: 1.08rem;
    letter-spacing: 0;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #f8fafc;
    color: var(--ink);
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(91, 77, 245, 0.14);
}

.primary-button,
.secondary-button,
.text-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.primary-button {
    padding: 0 18px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    box-shadow: 0 12px 24px rgba(91, 77, 245, 0.24);
}

.secondary-button {
    padding: 0 18px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--ink);
}

.compact {
    min-height: 44px;
}

.text-link {
    color: var(--brand);
}

.form-error,
.flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 22px;
    background: #fde7e4;
    color: var(--danger);
    font-weight: 700;
}

.flash.success {
    background: #e7f8ef;
    color: #047857;
}

.hero-panel,
.profile-hero {
    overflow: hidden;
    margin-bottom: 18px;
    padding: 22px;
    border-radius: var(--radius-3xl);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(15, 118, 110, 0.86)),
        url("data:image/svg+xml,%3Csvg width='180' height='180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18'%3E%3Cpath d='M24 90h132M90 24v132'/%3E%3Ccircle cx='90' cy='90' r='48'/%3E%3C/g%3E%3C/svg%3E");
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-panel p,
.profile-hero p {
    max-width: 640px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78);
}

.hero-panel .eyebrow,
.profile-hero .eyebrow {
    color: #bff4ec;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.metric-card,
.panel,
.filter-panel,
.member-card,
.church-card,
.inline-create,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius-3xl);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.metric-card {
    padding: 16px;
}

.metric-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--brand);
    font-size: 1.75rem;
    font-weight: 900;
}

.section-head,
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 16px;
}

.page-title h1,
.section-head h2 {
    margin-bottom: 4px;
}

.page-title {
    position: relative;
}

.filter-panel,
.inline-create {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    backdrop-filter: blur(12px);
}

.registry-title {
    margin-top: 0;
    align-items: flex-start;
}

.registry-title h1 {
    margin-bottom: 2px;
    font-size: 1.42rem;
    font-weight: 900;
}

.registry-title p {
    color: #33415f;
    font-size: 0.82rem;
}

.registry-search {
    margin-bottom: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.registry-search label {
    position: relative;
    display: block;
}

.registry-search label > span {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 1;
    transform: translateY(-50%);
    color: #9aa7bb;
    font-size: 1rem;
}

.registry-search input {
    height: 48px;
    padding-left: 42px;
    border: 0;
    border-radius: 22px;
    background: #f0f3f8;
    color: var(--ink);
    font-size: 0.82rem;
}

.chip-rail {
    display: flex;
    gap: 8px;
    width: calc(100% + 40px);
    margin: 0 -20px 20px;
    padding: 0 20px 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.chip-rail::-webkit-scrollbar {
    display: none;
}

.chip-rail a {
    display: inline-flex;
    min-width: max-content;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 999px;
    background: #f3f6fb;
    color: #31405f;
    font-size: 0.72rem;
    font-weight: 800;
}

.chip-rail a.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(91, 77, 245, 0.24);
}

.filter-grid,
.two-col,
.detail-grid,
.split-grid,
.church-grid {
    display: grid;
    gap: 12px;
}

.member-list {
    display: grid;
    gap: 12px;
}

.member-card,
.member-card-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.member-card {
    min-height: 70px;
    padding: 12px 14px;
    border-radius: 24px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.registry-list .member-card {
    border-color: #edf2f7;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.045);
}

.member-card:active,
.church-card:active,
.metric-card:active {
    transform: scale(0.985);
}

.member-card-main {
    flex: 1;
}

.registry-list .member-card {
    display: block;
}

.registry-list .member-card-main {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto 12px;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 3px;
    width: 100%;
    align-items: center;
}

.registry-list .person-avatar {
    grid-row: 1 / 3;
    grid-column: 1;
}

.registry-list .member-main {
    grid-row: 1 / 3;
    grid-column: 2;
    align-self: center;
}

.registry-list .pill {
    grid-row: 1;
    grid-column: 3;
    align-self: start;
    justify-self: end;
    margin-top: 1px;
}

.registry-list .chevron {
    grid-row: 1 / 3;
    grid-column: 4;
    align-self: center;
    justify-self: end;
}

.person-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    background: #f3f6fb;
    color: #8fa1b7;
    font-size: 1rem;
    box-shadow: inset 0 -9px 0 rgba(72, 94, 126, 0.08);
}

.person-avatar::before {
    content: none;
}

.person-avatar::after {
    content: "";
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--accent);
}

.status-admin::after {
    background: #ef4444;
}

.person-avatar img {
    position: relative;
    z-index: 1;
}

.avatar-tone-0,
.avatar-tone-1,
.avatar-tone-2,
.avatar-tone-3,
.avatar-tone-4,
.avatar-tone-5 {
    background-color: #f3f6fb;
}

.person-avatar img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

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

.member-main strong,
.member-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-main strong {
    color: #07142f;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.member-main small {
    margin-top: 4px;
    color: #66758f;
    font-size: 0.62rem;
}

.pill {
    display: inline-flex;
    max-width: 76px;
    min-height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 7px;
    background: #eef1ff;
    color: #3e35d8;
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rank-member {
    background: #f2f5fa;
    color: #33415f;
}

.rank-youth {
    background: #d8f8e8;
    color: #047857;
}

.rank-elder {
    background: #fff0c2;
    color: #b36b00;
}

.rank-deacon {
    background: #e0f2fe;
    color: #0369a1;
}

.chevron {
    display: inline-grid;
    place-items: center;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.registry-actions {
    display: none;
}

.quick-actions a,
.quick-actions button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f9fbfd;
    color: var(--brand);
    cursor: pointer;
    font-weight: 900;
}

.quick-actions button {
    color: var(--danger);
}

.panel {
    margin-bottom: 14px;
    padding: 16px;
}

.chart-list {
    display: grid;
    gap: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.bar-row i {
    grid-column: 1 / -1;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand) var(--value), var(--green-soft) var(--value));
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    font-size: 1.35rem;
}

.action-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
}

.detail-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
}

.detail-item span,
.detail-item strong {
    display: block;
}

.detail-item strong {
    margin-top: 4px;
}

.info-list {
    display: grid;
    gap: 12px;
}

.info-list p {
    display: grid;
    gap: 4px;
    margin-bottom: 0;
}

.preserve-lines {
    white-space: pre-wrap;
}

.wide-form {
    max-width: 820px;
}

.church-grid {
    grid-template-columns: 1fr;
}

.church-card {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.church-card > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.church-card h2 {
    margin: 0;
}

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

.church-stats span {
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: 22px;
    background: #f3f7fb;
    color: var(--muted);
    font-size: 0.78rem;
}

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

.empty-state {
    padding: 28px 18px;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    right: 20px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 20px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    min-height: 70px;
    padding: 8px 14px;
    border: 0;
    border-radius: 28px;
    background: rgba(30, 41, 59, 0.96);
    box-shadow: 0 18px 32px rgba(18, 27, 47, 0.28);
    backdrop-filter: blur(18px);
}

.bottom-nav a {
    display: grid;
    min-height: 54px;
    place-items: center;
    border-radius: 20px;
    color: #7f8ca8;
    font-size: 0;
    font-weight: 800;
}

.bottom-nav span {
    display: inline-grid;
    place-items: center;
    font-size: 1.18rem;
}

.bottom-nav a.active {
    background: transparent;
    color: #8d85ff;
}

.fab {
    position: fixed;
    right: auto;
    bottom: calc(48px + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 35;
    display: inline-grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 0;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 28px rgba(91, 77, 245, 0.32);
    cursor: pointer;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    transform: translateX(-50%);
}

.modal-sheet {
    position: fixed;
    top: 8px;
    right: 0;
    bottom: 0;
    left: 0;
    width: min(390px, 100%);
    max-width: none;
    max-height: none;
    margin: 0 auto;
    padding: 28px 24px calc(22px + env(safe-area-inset-bottom));
    overflow: auto;
    border: 0;
    border-radius: 34px 34px 0 0;
    background: #fff;
    box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px);
}

.modal-sheet::backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.small-sheet {
    max-height: 420px;
}

.sheet-handle {
    width: 44px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #cbd5e1;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 34px;
}

.sheet-head h2 {
    margin-bottom: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

.sheet-title-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 12px;
    background: #eef0ff;
    color: var(--brand);
    font-size: 0.98rem;
}

.modal-close-form {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
}

.sheet-close {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #f3f6f9;
    color: #91a0b6;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
}

.sheet-form {
    padding-bottom: 4px;
    gap: 18px;
}

.sheet-form label {
    gap: 8px;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sheet-form input,
.sheet-form select,
.sheet-form textarea {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #f6f8fb;
    color: #334155;
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
}

.sheet-form textarea {
    min-height: 56px;
    padding-top: 16px;
}

.sheet-form input::placeholder,
.sheet-form textarea::placeholder {
    color: #94a3b8;
}

.sheet-form select[name="church_name"] {
    border-color: #c7d2fe;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(199, 210, 254, 0.35);
}

.sheet-form .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sheet-form .primary-button {
    min-height: 46px;
    margin-top: 4px;
    border-radius: 16px;
    box-shadow: 0 18px 28px rgba(79, 70, 229, 0.22);
}

.photo-tile {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    gap: 4px;
    margin: -4px auto 12px;
    border: 1px dashed #dbe4ef;
    border-radius: 18px;
    background: #f8fafc;
    color: #8fa1b7;
    font-size: 1.05rem;
}

.photo-tile span {
    color: #94a3b8;
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
}

@media (min-width: 720px) {
    .content {
        padding: 28px 20px 42px;
    }

    .app-shell {
        padding-bottom: 94px;
    }

    .topbar {
        padding-inline: 24px;
    }

    .bottom-nav {
        top: auto;
        right: calc((100vw - min(430px, 100vw)) / 2 + 20px);
        bottom: calc(14px + env(safe-area-inset-bottom));
        left: calc((100vw - min(430px, 100vw)) / 2 + 20px);
        width: auto;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bottom-nav a {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 0;
        font-size: 0;
    }

    .content {
        padding-left: 20px;
    }

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

    .filter-grid {
        grid-template-columns: 1.4fr 1fr 0.8fr auto;
        align-items: end;
    }

    .two-col,
    .split-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .church-grid {
        grid-template-columns: 1fr;
    }

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

    .inline-create {
        grid-template-columns: 1fr auto;
        align-items: end;
    }
}

@media (min-width: 1040px) {
    .church-grid {
        grid-template-columns: 1fr;
    }
}

/* Teal church-management app skin */
:root {
    --bg: #eef4f1;
    --surface: #ffffff;
    --ink: #20242d;
    --muted: #6d737c;
    --line: #e4e8e5;
    --brand: #10a6ad;
    --brand-strong: #078b92;
    --shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
    --soft-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
}

html {
    background: #dbeeee;
}

body {
    background:
        radial-gradient(ellipse at -10% 60%, transparent 0 30%, rgba(100, 100, 104, 0.68) 31% 42%, transparent 43%),
        radial-gradient(ellipse at 110% 64%, transparent 0 30%, rgba(100, 100, 104, 0.68) 31% 42%, transparent 43%),
        linear-gradient(180deg, #f2ffff 0%, #eaf7f8 55%, #09b9c0 100%);
}

.topbar {
    display: none;
}

.app-shell {
    position: relative;
    width: min(430px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.content {
    width: 100%;
    padding: 0 0 88px;
}

.app-bar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    padding: 22px 18px 14px;
    background: linear-gradient(180deg, #0fb0b7, #0c9da4);
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.app-bar h1 {
    margin: 0;
    color: #fff;
    font-size: 1.38rem;
    font-weight: 500;
    line-height: 1;
}

.app-bar-actions {
    position: absolute;
    right: 14px;
    bottom: 10px;
    display: flex;
    gap: 12px;
}

.app-bar-actions button,
.profile-topbar button,
.profile-topbar a {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.45rem;
}

.dashboard-tools {
    display: flex;
    justify-content: flex-end;
    padding: 18px 16px 10px;
}

.dashboard-tools button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 0;
    border-radius: 3px;
    background: #fff;
    color: #2e3238;
    box-shadow: var(--soft-shadow);
    font-weight: 600;
}

.dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 10px 18px 20px;
    margin: 0;
}

.dashboard-card {
    display: grid;
    min-height: 138px;
    place-items: center;
    padding: 18px 12px 12px;
    border: 1px solid #d7dbd8;
    border-radius: 3px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    text-align: center;
}

.dashboard-card span {
    margin: 0;
    color: var(--brand-strong);
    font-size: 2.15rem;
    font-weight: 800;
}

.dashboard-card small {
    color: #20242d;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.dashboard-card em {
    display: block;
    width: calc(100% + 24px);
    margin: 8px -12px -12px;
    padding: 6px;
    border-top: 1px solid #e4e4e4;
    background: #f6f6f6;
    color: #20242d;
    font-style: normal;
}

.compact-head {
    padding: 8px 18px;
    margin: 0;
}

.compact-head h2 {
    margin: 0;
    color: var(--brand-strong);
}


.show-filters,
.members-search,
.members-filters {
    display: block !important;
}

.pagination-nav {
    display: flex;
    justify-content: center;
    margin: 18px 0 10px;
}
.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
}
.pagination li {
    margin: 0;
}
.pagination li.active a {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 6px 14px;
}
.pagination a {
    display: inline-block;
    padding: 6px 14px;
    color: var(--brand-strong);
    text-decoration: none;
    border-radius: 12px;
    background: #f3f6fb;
    transition: background 0.2s;
}
.pagination a:hover {
    background: var(--brand);
    color: #fff;
}

.show-search .people-search {
    display: grid;
    padding: 10px 14px;
    margin: 0;
    border-radius: 0;
    background: #fff;
}

.show-filters .people-filters {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
}

.show-filters .people-filters a.active {
    background: var(--brand);
}

.people-list {
    display: grid;
    gap: 0;
    padding: 0;
}

.people-row,
.people-row-card {
    display: block;
    min-height: 82px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    border-bottom: 1px solid #e1e1e1;
}

.people-row,
.people-row-card .member-card-main,
.registry-list .people-row-card .member-card-main {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 82px;
    padding: 8px 14px;
}

.people-row .person-avatar,
.registry-list .people-row-card .person-avatar {
    grid-column: 1;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 42%, #ffe2c4 0 24%, transparent 25%), #8e44ad;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: none;
}

.people-row .person-avatar.gender-male,
.registry-list .people-row-card .person-avatar.gender-male {
    background: #dff3ff;
    color: #078b92;
}

.people-row .person-avatar.gender-female,
.registry-list .people-row-card .person-avatar.gender-female {
    background: #ffe3f0;
    color: #c0266b;
}

.person-avatar::after {
    display: none;
}

.people-row .member-main,
.registry-list .people-row-card .member-main {
    grid-column: 2;
}

.people-row .member-main strong,
.registry-list .people-row-card .member-main strong {
    color: var(--brand-strong);
    font-size: 1.13rem;
    font-weight: 800;
    text-transform: none;
    text-decoration: none;
}

.people-row .member-main small,
.registry-list .people-row-card .member-main small {
    margin-top: 3px;
    color: #2a2d33;
    font-size: 0.92rem;
    line-height: 1.25;
    white-space: normal;
}

.row-menu {
    grid-column: 3;
    display: inline-grid;
    justify-self: end;
    place-items: center;
    color: var(--brand-strong);
    font-size: 1.35rem;
}

.registry-list .pill,
.registry-list .chevron,
.registry-actions {
    display: none;
}

.group-list {
    background: #fff;
}

.group-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 28px;
    gap: 12px;
    min-height: 86px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e1e1e1;
    background: #fff;
}

.group-avatar {
    display: inline-grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    background: #f7d9aa;
    color: var(--brand-strong);
    font-weight: 900;
}

.group-row strong {
    display: block;
    color: var(--brand-strong);
    font-size: 1.14rem;
    line-height: 1.15;
}

.group-row small {
    display: block;
    margin-top: 4px;
    color: #20242d;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
}

.group-row i {
    color: var(--brand-strong);
    font-style: normal;
}

.fab {
    right: calc((100vw - min(430px, 100vw)) / 2 + 24px);
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: auto;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.32);
    font-size: 1.75rem;
    transform: none;
}

.bottom-nav {
    right: calc((100vw - min(430px, 100vw)) / 2);
    bottom: 0;
    left: calc((100vw - min(430px, 100vw)) / 2);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-height: 68px;
    padding: 5px 4px calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid #d7d7d7;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -2px 7px rgba(0, 0, 0, 0.12);
}

.bottom-nav a {
    min-height: 58px;
    color: #777;
    font-size: 0.72rem;
    font-weight: 500;
}

.bottom-nav span {
    font-size: 1.42rem;
}

.bottom-nav a.active {
    color: var(--brand-strong);
}

.nav-badge {
    position: relative;
}

.nav-badge i {
    position: absolute;
    top: -7px;
    right: -8px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.68rem;
    font-style: normal;
}

.profile-topbar {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    min-height: 76px;
    align-items: center;
    padding: 18px 10px 8px;
    background: #fff;
    color: #20242d;
}

.profile-topbar h1 {
    margin: 0;
    overflow: hidden;
    color: #20242d;
    font-size: 1.35rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-topbar a {
    color: var(--brand-strong);
}

.profile-topbar button {
    justify-self: end;
    color: var(--brand-strong);
}

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 54px;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e4e4e4;
}

.profile-tabs a {
    display: grid;
    min-height: 54px;
    place-items: center;
    color: #666;
    border-bottom: 3px solid transparent;
}

.profile-tabs a.active {
    color: var(--brand-strong);
    border-color: var(--brand);
}

.profile-card {
    display: grid;
    gap: 18px;
    justify-items: center;
    padding: 22px 20px 28px;
    background: #edf5ed;
}

.profile-card .profile-avatar {
    width: 142px;
    height: 142px;
    border: 0;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 38%, #ffe0bc 0 27%, transparent 28%), #9b3fb5;
    color: #fff;
    font-size: 3.5rem;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.profile-actions a {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--brand);
    border-radius: 999px;
    color: var(--brand-strong);
    background: rgba(255, 255, 255, 0.55);
}

.profile-info {
    display: grid;
    gap: 34px;
    padding: 34px 28px;
    background: #fff;
}

.profile-info p {
    margin: 0;
}

.profile-info strong {
    display: block;
    margin-bottom: 8px;
    color: #20242d;
    font-size: 1rem;
}

.profile-info span {
    display: block;
    color: #30343b;
    font-size: 1.2rem;
}

.text-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
}

.text-tabs a {
    color: #30343b;
    font-weight: 700;
}

.text-tabs a.active {
    color: var(--brand-strong);
}

@media (min-width: 720px) {
    .content {
        padding: 0 0 88px;
    }

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

.bottom-nav a {
    position: relative;
}

.bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 20%;
    right: 20%;
    height: 3px;
    border-radius: 999px;
    background: var(--brand);
}

.modal-sheet {
    width: min(430px, 100%);
    border-radius: 14px 14px 0 0;
}

.sheet-form input,
.sheet-form select,
.sheet-form textarea {
    border: 0;
    border-bottom: 2px solid #cfcfcf;
    border-radius: 0;
    background: #fff;
}

.sheet-form select[name="church_name"] {
    border-color: var(--brand);
    box-shadow: none;
}

/* Shared finish layer: keep every page on the same teal mobile-app style. */
:root {
    --bg: #eef4f1;
    --surface: #ffffff;
    --ink: #20242d;
    --muted: #6d737c;
    --line: #e1e6e3;
    --brand: #10a6ad;
    --brand-strong: #078b92;
    --danger: #dc2626;
    --field-line: #c9d1cd;
    --shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
    --soft-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
}

html {
    color: var(--ink);
    font-family: 'Montserrat', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body {
    background: linear-gradient(180deg, #f2ffff 0%, #e9f6f6 56%, #09b9c0 100%);
}

.app-shell {
    background: var(--bg);
}

.content {
    padding: 0 0 88px;
}

.app-bar,
.detail-app-bar {
    min-height: 76px;
    padding: 22px 18px 14px;
    background: linear-gradient(180deg, #0fb0b7, #0c9da4);
    color: #fff;
}

.app-bar h1,
.detail-app-bar h1 {
    max-width: calc(100% - 112px);
    overflow: hidden;
    color: #fff;
    font-size: 1.38rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-bar-back,
.app-bar-spacer {
    position: absolute;
    bottom: 10px;
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
}

.app-bar-back {
    left: 14px;
    color: #fff;
}

.app-bar-spacer {
    right: 14px;
}

.login-screen {
    min-height: calc(100vh - 88px);
    align-items: center;
    padding: 34px 18px 108px;
    background: linear-gradient(180deg, #0fb0b7 0 42%, var(--bg) 42% 100%);
}

.login-card {
    width: 100%;
    padding: 24px 20px 22px;
    border: 1px solid #d7dbd8;
    border-radius: 3px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    backdrop-filter: none;
}

.login-emblem {
    width: 56px;
    height: 56px;
    border: 2px solid var(--brand);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-strong);
    box-shadow: none;
}

.login-card h1 {
    color: var(--brand-strong);
    font-size: 1.62rem;
    font-weight: 800;
}

.login-card .muted {
    color: #30343b;
    font-size: 0.92rem;
    line-height: 1.45;
}

.panel,
.empty-state {
    margin: 10px 0 0;
    padding: 22px 28px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.wide-form,
.member-form {
    max-width: none;
    margin: 0;
    padding: 20px 18px 104px;
}

.form-stack {
    gap: 18px;
}

.form-stack label,
.sheet-form label {
    gap: 8px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-stack input,
.form-stack select,
.form-stack textarea,
.sheet-form input,
.sheet-form select,
.sheet-form textarea {
    min-height: 48px;
    padding: 12px 0 9px;
    border: 0;
    border-bottom: 2px solid var(--field-line);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-size: 0.95rem;
    letter-spacing: 0;
    text-transform: none;
}

.form-stack textarea,
.sheet-form textarea {
    min-height: 74px;
    padding-top: 12px;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus,
.sheet-form input:focus,
.sheet-form select:focus,
.sheet-form textarea:focus {
    border-color: var(--brand);
    box-shadow: none;
}

.form-section {
    margin: 8px 0 -4px;
    color: var(--brand-strong);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.primary-button,
.secondary-button {
    min-height: 48px;
    border-radius: 3px;
    box-shadow: var(--soft-shadow);
}

.primary-button,
.sheet-form .primary-button {
    background: var(--brand);
    color: #fff;
}

.form-submit {
    width: 100%;
    margin-top: 10px;
}

.form-error,
.flash {
    border-radius: 3px;
    box-shadow: none;
}

.flash {
    margin: 12px 14px;
}

.form-error p {
    margin: 0;
}

.form-error p + p {
    margin-top: 6px;
}

.photo-upload {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 0;
    cursor: pointer;
}

.photo-preview-empty,
.photo-preview-image {
    grid-column: 1;
    grid-row: 1;
    width: 54px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.photo-preview-empty {
    display: inline-grid;
    place-items: center;
    background: #edf5ed;
    color: var(--brand-strong);
}

.photo-preview-image {
    background: #edf5ed;
    object-fit: cover;
}

.photo-preview-empty[hidden],
.photo-preview-image.is-empty,
.file-input {
    display: none;
}

.photo-upload .helper-text {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    color: #30343b;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.modal-sheet {
    border-radius: 3px 3px 0 0;
}

.sheet-head {
    margin-bottom: 26px;
}

.sheet-title-icon,
.sheet-close {
    border-radius: 999px;
}

.profile-card,
.profile-info,
.profile-tabs,
.group-list,
.people-list {
    box-shadow: none;
}

.profile-card {
    background: #edf5ed;
}

.profile-info {
    border-top: 1px solid var(--line);
}

.members-search,
.members-filters {
    display: none;
}

.show-search .members-search {
    display: grid;
    padding: 10px 14px;
    margin: 0;
    border-radius: 0;
    background: #fff;
}

.show-filters .members-filters {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
}

.pagination-nav {
    padding: 14px 14px 96px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.pagination {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.pagination::-webkit-scrollbar {
    display: none;
}

.pagination a {
    display: inline-flex;
    min-width: max-content;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #f3f6fb;
    color: #30343b;
    font-size: 0.76rem;
    font-weight: 800;
}

.pagination li.active a {
    background: var(--brand);
    color: #fff;
}

@media (min-width: 720px) {
    .content {
        padding: 0 0 88px;
    }
}

/* Reference-inspired mobile UX refresh */
:root {
    --bg: #f6faff;
    --surface: #ffffff;
    --surface-blue: #d9f0ff;
    --surface-soft: #eef7ff;
    --ink: #101321;
    --muted: #6d7280;
    --line: #e5e9f0;
    --brand: #0d7fe7;
    --brand-strong: #0a66c2;
    --navy: #253855;
    --danger: #dc2626;
    --shadow: 0 16px 34px rgba(26, 51, 89, 0.08);
    --soft-shadow: 0 8px 18px rgba(26, 51, 89, 0.06);
    --radius-card: 14px;
    --radius-soft: 18px;
}

html {
    background: #050505;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    background: #050505;
}

.app-shell {
    width: min(430px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(221, 239, 255, 0.82), transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, #f6faff 58%, #ffffff 100%);
    box-shadow: none;
}

.content {
    padding: 0 24px 108px;
}

.topbar {
    display: none;
}

.app-bar,
.detail-app-bar {
    position: relative;
    min-height: 96px;
    margin: 0 -24px 8px;
    padding: 52px 24px 18px;
    background: transparent;
    color: var(--ink);
    box-shadow: none;
}

.app-bar h1,
.detail-app-bar h1 {
    max-width: calc(100% - 96px);
    margin: 0 auto;
    color: var(--ink);
    font-size: 1.26rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

.app-bar-actions {
    right: 22px;
    bottom: 12px;
    gap: 8px;
}

.app-bar-actions button,
.app-bar-back,
.profile-topbar button,
.profile-topbar a {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--brand);
    box-shadow: var(--soft-shadow);
}

.app-bar-back {
    left: 24px;
    bottom: 12px;
}

.app-bar-spacer {
    right: 24px;
    bottom: 12px;
}

.home-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 46px 0 18px;
}

.progress-section {
    margin-top: 0;
}

.home-profile {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.home-avatar,
.avatar-button,
.group-avatar,
.person-avatar,
.profile-avatar {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #cfeaff;
    color: var(--brand);
    font-weight: 800;
}

.home-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 3px solid #fff;
    box-shadow: var(--soft-shadow);
}

.home-profile strong,
.home-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-profile strong {
    font-size: 1rem;
    font-weight: 800;
}

.home-profile small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.home-alert {
    position: relative;
    display: inline-grid;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--soft-shadow);
}

.home-alert::after {
    content: "";
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--brand);
}

.section-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.section-line h1,
.totals-section h2,
.compact-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0;
}

.section-line span {
    color: var(--ink);
    font-size: 0.8rem;
}

.section-line strong {
    margin-left: 4px;
    font-weight: 900;
}

.progress-card,
.totals-card,
.login-card,
.modal-sheet,
.panel,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.progress-card {
    padding: 18px 20px 20px;
}

.progress-arc {
    --progress: 75%;
    position: relative;
    display: grid;
    width: 238px;
    max-width: 100%;
    aspect-ratio: 2 / 1;
    place-items: center;
    margin: 2px auto 18px;
    overflow: hidden;
}

.progress-arc::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px 999px 0 0;
    background:
        conic-gradient(from 270deg at 50% 100%, var(--brand) 0 34%, #cfeeff 34% 50%, var(--navy) 50% 62%, #f6f6f7 62% 100%);
}

.progress-arc::after {
    content: "";
    position: absolute;
    inset: 28px 28px 0;
    border-radius: 999px 999px 0 0;
    background: #fff;
}

.progress-arc strong,
.progress-arc span,
.progress-arc small {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
}

.progress-arc strong {
    align-self: end;
    margin-top: 38px;
    color: var(--ink);
    font-size: 1.7rem;
    font-weight: 900;
}

.progress-arc span {
    color: var(--muted);
    font-size: 0.88rem;
}

.progress-arc small {
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 700;
}

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

.progress-stats a {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.progress-stats span {
    color: var(--ink);
    font-size: 0.82rem;
}

.progress-stats strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.progress-stats i {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0f2f5;
}

.progress-stats i::before {
    content: "";
    display: block;
    width: 46%;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.progress-stats i.bar-full::before {
    width: 100%;
}

.progress-stats i.bar-mid::before {
    width: 58%;
}

.progress-stats i.bar-low::before {
    width: 34%;
}

.progress-stats a:nth-child(1) i::before {
    background: var(--navy);
}

.progress-stats a:nth-child(2) i::before {
    background: #86d4f5;
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 32px 0 30px;
}

.action-card {
    display: grid;
    min-height: 94px;
    place-items: center;
    gap: 10px;
    padding: 14px 8px;
    border-radius: 12px;
    color: #fff;
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.action-card .app-icon {
    width: 1.55em;
    height: 1.55em;
}

.action-card span {
    font-size: 0.86rem;
    font-weight: 700;
}

.action-card.dark {
    background: var(--navy);
}

.action-card.soft {
    background: var(--surface-blue);
    color: var(--navy);
}

.action-card.bright {
    background: var(--brand);
}

.totals-section {
    margin-bottom: 24px;
}

.totals-section h2 {
    margin-bottom: 12px;
}

.totals-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 22px 16px;
}

.totals-card a {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 0 8px;
    text-align: center;
}

.totals-card a + a {
    border-left: 1px solid #d8dce3;
}

.totals-card strong {
    color: var(--brand);
    font-size: 0.96rem;
    font-weight: 900;
}

.totals-card span {
    color: var(--ink);
    font-size: 0.72rem;
    line-height: 1.15;
}

.compact-head,
.section-head {
    padding: 0;
    margin: 0 0 12px;
}

.text-link {
    min-height: auto;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 800;
}

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

.metric-card,
.dashboard-card {
    min-height: 104px;
    padding: 18px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.dashboard-card span,
.metric-card span {
    color: var(--brand);
    font-size: 1.8rem;
}

.dashboard-card small,
.metric-card small {
    color: var(--ink);
}

.members-list,
.people-list,
.group-list {
    display: grid;
    gap: 10px;
    padding: 0;
    background: transparent;
}

.members-row,
.people-row,
.group-row,
.people-row-card,
.members-row-card,
.member-card {
    display: block;
    min-height: 74px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.members-row,
.people-row,
.group-row,
.people-row-card .member-card-main,
.members-row-card .member-card-main,
.registry-list .people-row-card .member-card-main {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 26px;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 74px;
    padding: 10px 14px;
}

.person-avatar,
.people-row .person-avatar,
.registry-list .people-row-card .person-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #d9f0ff;
    color: var(--brand);
    box-shadow: none;
}

.person-avatar.gender-female,
.people-row .person-avatar.gender-female,
.registry-list .people-row-card .person-avatar.gender-female {
    background: #ffe2f1;
    color: #c0266b;
}

.person-avatar img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.person-avatar::after {
    display: none;
}

.member-main strong,
.people-row .member-main strong,
.registry-list .people-row-card .member-main strong,
.group-row strong {
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: none;
}

.member-main small,
.people-row .member-main small,
.registry-list .people-row-card .member-main small,
.group-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.row-menu,
.group-row i {
    color: var(--brand);
}

.group-avatar {
    width: 48px;
    height: 48px;
    background: #d9f0ff;
    color: var(--brand);
}

.people-search,
.members-search,
.registry-search {
    display: none;
    margin: -2px 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.show-search .people-search,
.show-search .members-search {
    display: grid;
}

.members-live-search {
    display: grid !important;
    margin: -4px 0 14px;
}

.registry-search input {
    height: 52px;
    padding-left: 44px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--soft-shadow);
}

.registry-search label > span {
    left: 16px;
    color: var(--brand);
}

.people-filters,
.members-filters,
.chip-rail {
    display: none;
    gap: 8px;
    width: calc(100% + 48px);
    margin: 0 -24px 14px;
    padding: 0 24px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.people-filters::-webkit-scrollbar,
.members-filters::-webkit-scrollbar,
.chip-rail::-webkit-scrollbar {
    display: none;
}

.show-filters .people-filters,
.show-filters .members-filters {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.chip-rail a {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 36px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    box-shadow: var(--soft-shadow);
}

.chip-rail a.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.show-filters .chip-rail,
.show-filters .people-filters,
.show-filters .members-filters,
.chip-rail.members-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
}

.profile-tabs {
    min-height: 58px;
    margin: 0 -24px;
    border: 0;
    background: transparent;
}

.profile-tabs a {
    min-height: 58px;
    color: var(--muted);
}

.profile-tabs a.active {
    color: var(--brand);
    border-color: var(--brand);
}

.profile-card {
    margin: 4px 0 14px;
    border-radius: var(--radius-card);
    background: #edf7ff;
}

.profile-card .profile-avatar {
    width: 128px;
    height: 128px;
    background: #d9f0ff;
    color: var(--brand);
}

.profile-actions a {
    border-color: var(--line);
    background: #fff;
    color: var(--brand);
    box-shadow: var(--soft-shadow);
}

.profile-info {
    gap: 18px;
    margin: 0 0 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.profile-info strong {
    color: var(--muted);
    font-size: 0.8rem;
}

.profile-info span {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 750;
}

.text-tabs {
    margin: 6px 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.login-screen {
    min-height: 100vh;
    padding: 84px 10px 54px;
    background: transparent;
}

.login-card {
    padding: 34px 22px 26px;
}

.login-emblem,
.photo-tile {
    width: 120px;
    height: 120px;
    margin: 0 auto 26px;
    border: 0;
    border-radius: 999px;
    background: #d9ecff;
    color: var(--brand);
    font-size: 1.35rem;
}

.login-card h1 {
    color: #050505;
    font-size: 1.75rem;
    text-align: center;
}

.login-card .eyebrow,
.login-card .muted {
    text-align: center;
}

.login-card .muted {
    margin-bottom: 26px;
}

.form-stack input,
.form-stack select,
.form-stack textarea,
.sheet-form input,
.sheet-form select,
.sheet-form textarea {
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.form-stack textarea,
.sheet-form textarea {
    padding-top: 14px;
}

.panel,
.wide-form,
.member-form {
    margin: 0;
    padding: 20px 0 112px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.member-form > label,
.member-form > .two-col,
.member-form > .form-section,
.member-form > .form-submit {
    margin-right: 0;
    margin-left: 0;
}

.form-section {
    color: var(--ink);
    font-size: 0.9rem;
    letter-spacing: 0;
    text-transform: none;
}

.primary-button,
.secondary-button,
.sheet-form .primary-button {
    min-height: 58px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 12px 24px rgba(13, 127, 231, 0.22);
}

.modal-sheet {
    width: min(430px, 100%);
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
}

.sheet-title-icon,
.sheet-close {
    background: #edf7ff;
    color: var(--brand);
}

.member-create-modal {
    top: 0;
    bottom: 0;
    height: 100dvh;
    max-height: none;
    padding: calc(18px + env(safe-area-inset-top)) 18px 0;
    overflow: hidden;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% -12%, rgba(207, 234, 255, 0.92), transparent 36%),
        #fff;
}

.member-create-modal::before {
    content: "";
    display: block;
    width: 46px;
    height: 5px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: #d8dee8;
}

.modal-sheet:not(.member-create-modal) {
    top: auto;
    bottom: 0;
    max-height: min(78vh, 520px);
    padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
    overflow: auto;
    border-radius: 24px 24px 0 0;
    background: #fff;
}

.modal-close-form {
    top: 18px;
    right: 18px;
}

.sheet-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    box-shadow: var(--soft-shadow);
}

.sheet-head {
    align-items: flex-start;
    gap: 12px;
    margin: 0 52px 18px 0;
}

.sheet-title-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 16px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 12px 22px rgba(13, 127, 231, 0.22);
}

.sheet-kicker,
.sheet-subtitle {
    margin: 0;
}

.sheet-kicker {
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sheet-head h2 {
    margin: 2px 0 4px;
    color: var(--ink);
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: 0;
}

.sheet-subtitle {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.sheet-form {
    max-height: calc(100dvh - 132px - env(safe-area-inset-top));
    margin: 0 -18px;
    padding: 0 18px 0;
    overflow-y: auto;
    gap: 12px;
    scrollbar-width: none;
}

.sheet-form::-webkit-scrollbar {
    display: none;
}

.sheet-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--soft-shadow);
}

.two-col.sheet-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-section h3 {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 900;
}

.sheet-form label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.sheet-form input,
.sheet-form select,
.sheet-form textarea {
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #dfe6ef;
    border-radius: 14px;
    background: #f8fbff;
    color: var(--ink);
    font-size: 0.9rem;
}

.sheet-form textarea {
    padding-top: 13px;
}

.sheet-form input:focus,
.sheet-form select:focus,
.sheet-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(13, 127, 231, 0.12);
}

.photo-tile {
    width: 104px;
    height: 104px;
    margin: 0 auto 4px;
    border: 1px dashed #9dccf6;
    border-radius: 28px;
    background: #eaf6ff;
    color: var(--brand);
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.5);
}

.photo-tile .app-icon {
    width: 1.8em;
    height: 1.8em;
}

.photo-tile span {
    color: var(--brand-strong);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
}

.sheet-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    margin: 2px -18px 0;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), #fff 34%);
}

.sheet-actions .primary-button {
    width: 100%;
    margin: 0;
    min-height: 58px;
    border-radius: 999px;
}

.fab {
    right: calc((100vw - min(430px, 100vw)) / 2 + 24px);
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: auto;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 20px;
    background: var(--brand);
    box-shadow: 0 14px 28px rgba(13, 127, 231, 0.28);
    transform: none;
}

.bottom-nav {
    right: calc((100vw - min(430px, 100vw)) / 2);
    bottom: 0;
    left: calc((100vw - min(430px, 100vw)) / 2);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-height: 76px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 28px rgba(26, 51, 89, 0.08);
    backdrop-filter: blur(18px);
}

.bottom-nav a {
    position: relative;
    min-height: 60px;
    color: #121212;
    font-size: 0.68rem;
    font-weight: 650;
}

.bottom-nav span {
    font-size: 1.18rem;
}

.bottom-nav a.active {
    background: transparent;
    color: var(--brand);
}

.bottom-nav a.active::before {
    display: none;
}

.logout-button {
    color: var(--muted) !important;
}

.pagination-nav {
    margin-top: 12px;
    padding: 0 0 110px;
    border: 0;
    background: transparent;
}

.pagination a {
    min-height: 38px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
}

.pagination li.active a {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

@media (min-width: 431px) {
    .app-shell {
        min-height: calc(100vh - 20px);
        margin-top: 10px;
        margin-bottom: 10px;
        border: 10px solid #121026;
        border-radius: 42px;
    }

    .bottom-nav {
        right: calc((100vw - 430px) / 2 + 10px);
        left: calc((100vw - 430px) / 2 + 10px);
        width: 410px;
        border-radius: 0 0 32px 32px;
    }

    .fab {
        right: calc((100vw - 430px) / 2 + 34px);
    }
}

/* Minimalist typography pass */
html,
body,
button,
input,
select,
textarea {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    letter-spacing: 0;
}

h1,
h2,
h3,
.app-bar h1,
.detail-app-bar h1,
.section-line h1,
.totals-section h2,
.compact-head h2,
.sheet-head h2,
.login-card h1 {
    font-weight: 650;
    letter-spacing: 0;
}

.home-profile strong,
.member-main strong,
.people-row .member-main strong,
.registry-list .people-row-card .member-main strong,
.group-row strong,
.profile-info span,
.dashboard-card span,
.metric-card span,
.totals-card strong,
.progress-arc strong,
.progress-stats strong {
    font-weight: 600;
    letter-spacing: 0;
}

.home-profile small,
.member-main small,
.people-row .member-main small,
.registry-list .people-row-card .member-main small,
.group-row small,
.profile-info strong,
.section-line span,
.totals-card span,
.progress-stats span,
.sheet-subtitle,
.login-card .muted {
    font-weight: 400;
    letter-spacing: 0;
}

label,
.form-stack label,
.sheet-form label,
.sheet-kicker,
.form-section,
.photo-tile span {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.primary-button,
.secondary-button,
.text-link,
.chip-rail a,
.pagination a,
.bottom-nav a,
.action-card span {
    font-weight: 500;
    letter-spacing: 0;
}

.app-bar h1,
.detail-app-bar h1 {
    font-size: 1.18rem;
}

.section-line h1,
.totals-section h2,
.compact-head h2 {
    font-size: 1.05rem;
}

.member-main strong,
.people-row .member-main strong,
.registry-list .people-row-card .member-main strong,
.group-row strong {
    font-size: 0.92rem;
}

.rank-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: #6f7785;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
}

.rank-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-name {
    flex: 0 0 auto;
    color: var(--brand);
    font-weight: 600;
}

.rank-separator {
    flex: 0 0 auto;
    color: #9aa2ad;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 64px;
    align-items: center;
    gap: 10px;
    margin: 0 -24px;
    padding: calc(7px + env(safe-area-inset-top)) 24px 7px;
    border-bottom: 1px solid rgba(225, 233, 240, 0.72);
    background: rgba(248, 251, 255, 0.92);
    box-shadow: 0 8px 22px rgba(26, 51, 89, 0.04);
    backdrop-filter: blur(18px);
}

.app-top-title {
    display: grid;
    grid-column: 1;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0;
    text-align: center;
}

.app-top-title strong,
.app-top-title small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-top-title strong {
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 600;
}

.app-top-title small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 400;
}

.home-head {
    padding-top: 22px;
}

.app-bar,
.detail-app-bar {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-height: 70px;
    padding-top: 24px;
    text-align: center;
}

.app-bar h1,
.detail-app-bar h1 {
    max-width: 100%;
    margin: 0;
}

.dashboard-grid {
    gap: 10px;
    margin-bottom: 22px;
}

.dashboard-card {
    min-height: 96px;
}

.dashboard-card.featured-stat {
    grid-column: 1 / -1;
    min-height: 118px;
    align-content: center;
    background: linear-gradient(135deg, #0d7fe7, #4db7ff);
    color: #fff;
}

.dashboard-card.featured-stat span,
.dashboard-card.featured-stat small {
    color: #fff;
}

.dashboard-card.featured-stat span {
    font-size: 2.3rem;
}

.people-list .people-row {
    border-radius: var(--radius-card);
}

.people-list .people-row + .people-row {
    margin-top: 10px;
}

.member-modal-trigger {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.church-modal-trigger {
    border: 1px solid var(--line);
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.member-detail-modal {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: min(430px, 100%);
    max-width: none;
    margin: 0 auto;
    padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -18px 45px rgba(26, 51, 89, 0.18);
}

.member-detail-modal::backdrop {
    background: rgba(16, 19, 33, 0.32);
    backdrop-filter: blur(4px);
}

.member-detail-close {
    position: absolute;
    top: 16px;
    right: 18px;
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fbff;
    color: var(--muted);
    cursor: pointer;
}

.member-detail-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-right: 44px;
    margin-bottom: 18px;
}

.member-detail-avatar {
    width: 58px;
    height: 58px;
}

.member-detail-head h2 {
    margin: 0 0 5px;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 650;
}

.member-detail-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.member-detail-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.member-detail-grid p {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.member-detail-grid span {
    color: var(--muted);
    font-size: 0.74rem;
}

.member-detail-grid strong {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 500;
}

.member-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.member-detail-actions .primary-button,
.member-detail-actions .secondary-button {
    min-height: 48px;
}

.member-detail-actions .secondary-button {
    background: #f8fbff;
    color: var(--brand);
    border: 1px solid var(--line);
    box-shadow: none;
}

.page-summary {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
    text-align: center;
}

.active-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--muted);
    font-size: 0.78rem;
}

.active-filter-bar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-filter-bar a {
    flex: 0 0 auto;
    color: var(--brand);
    font-weight: 500;
}

.empty-state .secondary-button {
    width: fit-content;
    margin: 16px auto 0;
    padding: 0 18px;
    background: #f8fbff;
    color: var(--brand);
    border: 1px solid var(--line);
    box-shadow: none;
}

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

.church-detail-avatar {
    width: 58px;
    height: 58px;
}

.member-detail-actions.single-action {
    grid-template-columns: 1fr;
}

/* Login refresh */
.login-screen {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px 22px;
    background:
        radial-gradient(circle at 50% 10%, rgba(207, 234, 255, 0.9), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #eef7ff 52%, #ffffff 100%);
}

.login-card {
    width: min(380px, 100%);
    padding: 24px;
    border: 1px solid rgba(225, 233, 240, 0.96);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 48px rgba(26, 51, 89, 0.12);
    backdrop-filter: blur(18px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-mark {
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: #e9f5ff;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 650;
}

.login-brand h1,
.login-brand p,
.login-copy h2,
.login-copy p {
    margin: 0;
}

.login-brand h1 {
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 650;
}

.login-brand p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
}

.login-copy {
    margin-bottom: 22px;
}

.login-copy h2 {
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 650;
    letter-spacing: 0;
}

.login-copy p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.login-card .form-stack {
    gap: 14px;
}

.login-card label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.login-card input {
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #dfe8f2;
    border-radius: 16px;
    background: #f8fbff;
    color: var(--ink);
    font-size: 0.95rem;
}

.login-card input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(13, 127, 231, 0.12);
}

.login-card .primary-button {
    width: 100%;
    min-height: 56px;
    margin-top: 4px;
    border-radius: 999px;
}

.login-card .form-error {
    margin-bottom: 18px;
    border-radius: 16px;
    background: #fff1f2;
    color: #be123c;
    font-size: 0.86rem;
    font-weight: 500;
}
