:root {
    --ink: #182638;
    --muted: #758197;
    --blue: #446fe8;
    --line: #e8edf4;
    --canvas: #f5f7fb;
}

body {
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-body { background: var(--canvas); }
.app-shell { min-height: 100vh; }
.sidebar {
    background: #142033;
    color: #e9efff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    left: 0;
    padding: 24px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: fixed;
    top: 0;
    width: 250px;
    z-index: 1100;
}

.brand { align-items: center; color: inherit; display: flex; gap: 11px; text-decoration: none; }
.brand:hover { color: inherit; }
.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font-size: 1.03rem; letter-spacing: .01em; }
.brand small { color: #9cabc5; font-size: .75rem; }
.brand-mark {
    align-items: center;
    background: linear-gradient(145deg, #83a7ff, #456ee2);
    border-radius: 12px;
    color: white;
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.sidebar-label { color: #8290aa; font-size: .7rem; font-weight: 700; letter-spacing: .12em; margin: 28px 10px 10px; text-transform: uppercase; }
.sidebar nav.nav {
    display: block;
    flex: 0 0 auto;
    overflow: visible;
}
.sidebar { scrollbar-color: rgba(173, 190, 220, .45) #142033; scrollbar-width: thin; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(173, 190, 220, .45); border-radius: 8px; }
.sidebar::-webkit-scrollbar-track { background: #142033; }
.sidebar .nav-link { border-radius: 10px; color: #c6d1e4; font-size: .92rem; margin: 2px 0; padding: 11px 12px; }
.sidebar .nav-link i { margin-right: 10px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: rgba(111, 144, 255, .16); color: #fff; }
.sidebar-group + .sidebar-label { margin-top: 18px; }
.sidebar-group { margin: 2px 0; }
.sidebar-group[data-open="true"] { position: relative; z-index: 1; }
.sidebar-group-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #c6d1e4;
    cursor: pointer;
    display: flex;
    font: inherit;
    justify-content: space-between;
    padding: 11px 12px;
    transition: background .15s ease, color .15s ease;
    width: 100%;
}
.sidebar-group-toggle:hover,
.sidebar-group[data-open="true"] > .sidebar-group-toggle {
    background: rgba(111, 144, 255, .12);
    color: #fff;
}
.sidebar-group[data-open="true"] > .sidebar-group-toggle {
    background: rgba(111, 144, 255, .18);
    color: #fff;
}
.sidebar-group-toggle > span:first-child { display: inline-flex; align-items: center; }
.sidebar-group-toggle > span:first-child i { margin-right: 10px; font-size: 1rem; }
.sidebar-group-chevron {
    display: inline-flex;
    transition: transform .2s ease;
    font-size: .7rem;
    color: #8a95ac;
}
.sidebar-group[data-open="true"] > .sidebar-group-toggle .sidebar-group-chevron { transform: rotate(90deg); color: #d4dff5; }
.sidebar-group-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: .4;
    transition: grid-template-rows .2s ease, opacity .15s ease, padding-top .2s ease;
}
.sidebar-group[data-open="true"] > .sidebar-group-panel {
    grid-template-rows: 1fr;
    opacity: 1;
    padding-top: 4px;
}
.sidebar-group-panel > .sidebar-group-panel-inner { overflow: hidden; min-height: 0; }
.sidebar-group-panel a.nav-link,
.sidebar-group-panel .nav-link {
    border-radius: 9px;
    font-size: .86rem;
    margin-left: 18px;
    padding: 9px 12px;
}
.sidebar-group-panel .nav-link i {
    margin-right: 8px;
    font-size: .8rem;
    opacity: .85;
}
.sidebar-group-panel .nav-link.sub-active {
    background: rgba(111, 144, 255, .18);
    color: #fff;
}
.sidebar-group.has-active > .sidebar-group-toggle {
    color: #fff;
}
.sidebar-footer { align-items: center; border-top: 1px solid rgba(255,255,255,.09); display: flex; gap: 10px; margin-top: auto; padding: 18px 6px 0; }
.sidebar-footer span:last-child { display: grid; font-size: .8rem; gap: 3px; }
.sidebar-footer small { color: #95a3bc; }
.online-indicator { background: #44cb8a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(68,203,138,.14); height: 9px; width: 9px; }

.main-area { margin-left: 250px; min-height: 100vh; }
.topbar { align-items: center; background: #fff; border-bottom: 1px solid var(--line); display: flex; height: 76px; justify-content: space-between; padding: 0 34px; }
.topbar-title { font-size: .95rem; font-weight: 700; }
.global-search { align-items: center; background: #f7f8fb; border: 1px solid #e8ecf3; border-radius: 10px; color: #8a95a7; display: flex; gap: 9px; margin: 0 auto 0 22px; max-width: 430px; padding: 0 10px 0 12px; width: min(38vw, 430px); }
.global-search input { background: transparent; border: 0; color: var(--ink); font-size: .78rem; min-width: 0; outline: 0; padding: 9px 0; width: 100%; }
.global-search:focus-within { background: #fff; border-color: #a8baf4; box-shadow: 0 0 0 3px rgba(83,120,232,.1); }
.global-search kbd { background: #fff; border: 1px solid #e4e8ef; border-radius: 5px; color: #929bad; font-size: .6rem; padding: 2px 5px; white-space: nowrap; }
.account-menu { align-items: center; display: flex; gap: 12px; }
.account-copy { display: grid; font-size: .82rem; gap: 3px; text-align: right; }
.account-copy small { color: var(--muted); }
.user-avatar { align-items: center; background: #e8efff; border-radius: 50%; color: #315ecb; display: inline-flex; font-weight: 700; height: 38px; justify-content: center; width: 38px; }
.content-area { margin: 0 auto; max-width: 1440px; padding: 34px; }
.menu-toggle { background: transparent; border: 0; display: none; font-size: 1.25rem; }
.sidebar-backdrop { display: none; }

.page-intro { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 26px; }
.page-intro h1, .login-heading h1, .error-card h1 { font-size: clamp(1.7rem, 3vw, 2.15rem); font-weight: 750; letter-spacing: -.035em; margin: 0 0 7px; }
.page-intro p:last-child, .login-heading > p:last-child { color: var(--muted); margin: 0; }
.eyebrow { color: var(--blue); font-size: .69rem; font-weight: 800; letter-spacing: .12em; margin: 0 0 7px; text-transform: uppercase; }
.today-badge, .subtle-tag { background: #eef3ff; border-radius: 999px; color: #526b9a; font-size: .78rem; padding: 8px 12px; }
.metric-card, .surface-card { background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 28px rgba(27,46,82,.045); }
.metric-card { align-items: center; display: flex; gap: 14px; min-height: 116px; padding: 20px; }
.metric-icon { align-items: center; border-radius: 12px; display: flex; font-size: 1.25rem; font-weight: 700; height: 44px; justify-content: center; width: 44px; }
.metric-icon.blue { background: #edf2ff; color: #466de1; }
.metric-icon.green { background: #e8f8f0; color: #209664; }
.metric-icon.violet { background: #f2edff; color: #785bd2; }
.metric-card p { color: var(--muted); font-size: .8rem; margin: 0 0 4px; }
.metric-card strong { display: block; font-size: 1.14rem; }
.metric-card small { color: #929bad; display: block; font-size: .72rem; margin-top: 3px; }
.surface-card { padding: 22px; }
.communication-log-table { min-width: 1000px; }
.communication-message-cell { max-width: 280px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 15px; }
.surface-card h2 { font-size: 1.12rem; font-weight: 700; margin: 0 0 7px; }
.role-list { display: grid; }
.role-row { align-items: center; border-top: 1px solid #eff2f7; display: flex; gap: 12px; padding: 15px 0; }
.role-symbol { align-items: center; background: #eff3ff; border-radius: 10px; color: var(--blue); display: flex; font-weight: 800; height: 36px; justify-content: center; width: 36px; }
.role-row > div { display: grid; flex: 1; font-size: .88rem; gap: 3px; }
.role-row small { color: var(--muted); font-size: .75rem; }
.role-status { background: #e9f8f0; border-radius: 999px; color: #218754; font-size: .71rem; padding: 5px 9px; }
.muted-copy { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.foundation-list { margin-top: 22px; }
.foundation-list div { align-items: center; border-top: 1px solid #eff2f7; display: flex; font-size: .81rem; gap: 10px; padding: 12px 0; }
.foundation-list div span:first-child { color: #9aa6ba; font-size: .71rem; }
.foundation-list div span:nth-child(2) { flex: 1; font-weight: 600; }
.foundation-list strong { color: #218754; font-size: .75rem; }
.empty-state { background: #f7f9fc; border-radius: 10px; color: var(--muted); padding: 20px; }

.auth-body { align-items: center; background: radial-gradient(circle at top left, #e8efff, transparent 43%), #f4f6fb; display: flex; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-container { width: 100%; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 65px rgba(26,45,82,.1); margin: 0 auto; max-width: 450px; padding: 34px; }
.installer-card { max-width: 820px; }
.installer-section-title { border-top: 1px solid var(--line); font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-top: 20px; }
.login-brand { color: var(--ink); margin-bottom: 38px; }
.login-brand small { color: var(--muted); }
.login-heading { margin-bottom: 25px; }
.login-heading h1 { font-size: 1.75rem; }
.login-heading > p:last-child { font-size: .9rem; }
.form-label { font-size: .86rem; font-weight: 650; }
.form-control { border-color: #dfe5ef; }
.form-control:focus { border-color: #7797f4; box-shadow: 0 0 0 .2rem rgba(68,111,232,.14); }
.btn-primary { background: #416de5; border-color: #416de5; }
.btn-primary:hover { background: #345ccc; border-color: #345ccc; }
.login-note { color: var(--muted); font-size: .8rem; margin: 22px 0 0; text-align: center; }
.error-card { margin: 8vh auto; max-width: 640px; }
.user-search { align-items: center; display: flex; gap: 8px; max-width: 390px; width: 100%; }
.user-table { font-size: .84rem; margin-bottom: 0; min-width: 780px; }
.user-table th { color: #7e899d; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.user-name { font-weight: 650; }
.account-status { background: #edf0f5; border-radius: 999px; color: #69758b; font-size: .72rem; padding: 5px 9px; }
.account-status.active { background: #e9f8f0; color: #218754; }
.account-status.pending { background: #fff5df; color: #946a18; }
.account-actions { position: relative; }
.account-actions summary { color: #416de5; cursor: pointer; font-size: .8rem; font-weight: 650; list-style: none; }
.account-actions summary::-webkit-details-marker { display: none; }
.account-action-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 35px rgba(27,46,82,.12); min-width: 270px; padding: 14px; position: absolute; right: 0; top: 26px; width: min(340px, 80vw); z-index: 5; }
.account-action-panel .form-label { font-size: .76rem; margin-bottom: 4px; }
.action-divider { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 13px; }
.empty-table { color: var(--muted); padding: 25px !important; text-align: center !important; }
.user-pagination { display: flex; gap: 7px; justify-content: flex-end; margin-top: 16px; }
.member-table { font-size: .83rem; margin-bottom: 0; min-width: 980px; }
.member-table th { color: #7e899d; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.member-directory-name { color: var(--ink); font-weight: 700; text-decoration: none; }
.member-directory-name:hover { color: var(--blue); text-decoration: underline; }
.account-status.inactive { background: #edf0f5; color: #69758b; }
.account-status.transferred { background: #edf2ff; color: #466de1; }
.account-status.deceased { background: #f2edff; color: #785bd2; }
.account-status.suspended { background: #fff0ed; color: #a34937; }
.member-hero { align-items: center; display: flex; gap: 22px; }
.member-profile-photo, .member-photo-placeholder { align-items: center; background: #e8efff; border-radius: 50%; color: #315ecb; display: inline-flex; flex: 0 0 100px; font-size: 1.5rem; font-weight: 800; height: 100px; justify-content: center; object-fit: cover; width: 100px; }
.member-hero-copy h2 { font-size: 1.05rem; margin: 12px 0 4px; }
.member-hero-copy p { color: var(--muted); margin: 0 0 10px; }
.member-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.member-tags span { background: #f0f4fb; border-radius: 999px; color: #56647a; font-size: .74rem; padding: 5px 10px; }
.member-profile-card { min-height: 360px; }
.member-tabs { flex-wrap: nowrap; overflow-x: auto; }
.member-tabs .nav-link { white-space: nowrap; }
.member-detail { border-bottom: 1px solid var(--line); display: grid; gap: 5px; min-height: 58px; padding: 8px 0 12px; }
.member-detail small { color: var(--muted); font-size: .76rem; }
.member-detail strong { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.member-notes { line-height: 1.8; white-space: pre-wrap; }
.member-form h2 { margin-bottom: 18px; }
.member-form-heading { align-items: center; display: flex; justify-content: space-between; }
.member-form-photo { border-radius: 50%; height: 68px; object-fit: cover; width: 68px; }
.member-print-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 18px; padding-bottom: 20px; }
.member-print-header h1 { font-size: 1.8rem; }
.duplicate-alert { margin-top: 14px; }
@media print {
    .sidebar, .topbar, .print-actions, .page-intro, .member-profile-card, form,
    .finance-filter, .report-filter, .finance-actions, .alert, [data-print] { display: none !important; }
    .main-area { margin: 0; }
    .content-area { max-width: none; padding: 0; }
    .financial-report-sheet, .surface-card { border: 0; box-shadow: none; padding: 0; }
    .financial-report-heading { align-items: flex-start; border-bottom: 1px solid #777; display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 12px; }
    .financial-report-heading h2 { color: #000; font-size: 18pt; }
    .financial-report-heading p { color: #333; }
    .financial-report-footer { border-top: 1px solid #777; color: #444; font-size: 9pt; margin-top: 20px; padding-top: 8px; }
    .finance-table { color: #000; font-size: 9pt; }
    .finance-table th, .finance-table td { background: #fff !important; color: #000 !important; }
    .member-print-sheet { border: 0; box-shadow: none; padding: 0; }
    body { background: #fff; }
}
.user-pagination a { align-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); display: inline-flex; font-size: .8rem; height: 34px; justify-content: center; text-decoration: none; width: 34px; }
.user-pagination a.current { background: var(--blue); border-color: var(--blue); color: #fff; }
.user-create-form { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.create-submit { align-self: end; }

.dashboard-intro { align-items: center; background: radial-gradient(ellipse at 92% 10%, rgba(120,151,244,.18), transparent 36%), linear-gradient(115deg, #fff 0%, #f8faff 100%); border: 1px solid #e5eaf4; border-radius: 20px; box-shadow: 0 12px 34px rgba(34,55,95,.055); margin-bottom: 25px; min-height: 146px; overflow: hidden; padding: 26px 30px; position: relative; }
.dashboard-intro h1 { font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -.045em; }
.dashboard-intro p:last-child { color: #718096; margin-top: 8px; }
.dashboard-date { align-items: center; background: #fff; border: 1px solid #e5eaf3; border-radius: 14px; color: #35435a; display: inline-flex; font-size: .8rem; font-weight: 650; gap: 10px; padding: 10px 15px; white-space: nowrap; }
.dashboard-date > span:last-child { display: grid; gap: 2px; }
.dashboard-date small { color: #8792a4; font-size: .62rem; font-weight: 600; }
.dashboard-live-dot { background: #25ad78; border-radius: 50%; height: 8px; width: 8px; }
.dashboard-section-title { align-items: end; display: flex; justify-content: space-between; margin: 0 2px 13px; }
.dashboard-section-title h2 { color: #26364e; font-size: 1.12rem; font-weight: 750; letter-spacing: -.025em; margin: 0; }
.dashboard-section-title .eyebrow { font-size: .61rem; margin-bottom: 4px; }
.dashboard-section-title > span { color: #8a95a6; font-size: .69rem; }
.dashboard-metrics { display: grid; gap: 13px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 30px; }
.dashboard-metric { align-items: center; background: #fff; border: 1px solid #e8ecf3; border-radius: 15px; box-shadow: 0 7px 22px rgba(27,46,82,.035); display: flex; gap: 13px; min-width: 0; padding: 18px; transition: box-shadow .18s ease, transform .18s ease; }
.dashboard-metric:hover { box-shadow: 0 12px 26px rgba(27,46,82,.075); transform: translateY(-2px); }
.dashboard-metric-mark { background: linear-gradient(180deg, #7694f2, #4777ed); border-radius: 8px; flex: 0 0 5px; height: 43px; }
.dashboard-metric-mark.green { background: #22a878; }
.dashboard-metric-mark.violet { background: #8466df; }
.dashboard-metric-mark.amber { background: #dc9a2e; }
.dashboard-metric-mark.rose { background: #da6c76; }
.dashboard-metric-content { display: grid; gap: 4px; min-width: 0; }
.dashboard-metric-content > span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.dashboard-metric-content strong { color: #1c2b42; font-size: clamp(1.05rem, 1.5vw, 1.38rem); letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.dashboard-metric-content small { color: #99a3b3; font-size: .68rem; }
.dashboard-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.dashboard-chart-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-activity-grid { align-items: start; }
.dashboard-panel { background: #fff; border: 1px solid #e8ecf3; border-radius: 16px; box-shadow: 0 8px 24px rgba(27,46,82,.035); min-width: 0; padding: 21px; }
.dashboard-panel-heading { align-items: flex-start; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 17px; }
.dashboard-panel-heading h2, .dashboard-section-heading h2 { color: #1c2b42; font-size: 1.02rem; font-weight: 720; letter-spacing: -.015em; margin: 0; }
.dashboard-panel-heading .eyebrow, .dashboard-section-heading .eyebrow { font-size: .62rem; margin-bottom: 5px; }
.chart-period { color: #8995a8; font-size: .67rem; white-space: nowrap; }
.dashboard-bars { align-items: end; border-bottom: 1px solid #e9edf4; display: flex; gap: 4px; height: 142px; overflow-x: auto; padding: 10px 0 0; }
.dashboard-bar-column { align-items: center; display: flex; flex: 1 0 15px; flex-direction: column; height: 100%; justify-content: end; min-width: 15px; }
.dashboard-bar-column > span { background: linear-gradient(180deg, #8aa6f8, #4c73e4); border-radius: 4px 4px 1px 1px; min-height: 3px; width: min(82%, 16px); }
.dashboard-bar-column > .income-bar { background: linear-gradient(180deg, #69d3aa, #25a879); }
.dashboard-bar-column > .expense-bar { background: linear-gradient(180deg, #f0a1a5, #d96c77); }
.dashboard-bar-column small { color: #8b96a7; font-size: .57rem; margin-top: 6px; }
.dash-height-1 { height: 10%; }.dash-height-2 { height: 20%; }.dash-height-3 { height: 30%; }.dash-height-4 { height: 40%; }.dash-height-5 { height: 50%; }.dash-height-6 { height: 60%; }.dash-height-7 { height: 70%; }.dash-height-8 { height: 80%; }.dash-height-9 { height: 90%; }.dash-height-10 { height: 100%; }
.chart-footnote { align-items: center; color: #738096; display: flex; font-size: .68rem; gap: 7px; margin-top: 12px; }
.chart-key { border-radius: 50%; display: inline-block; height: 8px; width: 8px; }
.blue-key { background: #5478e8; }.green-key { background: #2eaf81; }.rose-key { background: #da727b; }
.grouped-bars { gap: 5px; }
.dashboard-bar-pair { align-items: end; display: flex; flex: 1; gap: 2px; justify-content: center; width: 100%; }
.dashboard-bar-pair span { border-radius: 3px 3px 0 0; min-height: 2px; width: 36%; }
.distribution-panel { min-height: 250px; }
.dashboard-text-link { color: #5575d5; font-size: .72rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.dashboard-text-link:hover { color: #2d58c5; }
.distribution-list { display: grid; gap: 16px; padding-top: 3px; }
.distribution-row > div:first-child { align-items: center; color: #4c5a70; display: flex; font-size: .77rem; justify-content: space-between; margin-bottom: 7px; }
.distribution-row strong { font-weight: 650; }.distribution-row > div:first-child span { color: #7d899b; font-variant-numeric: tabular-nums; }
.distribution-track { background: #eff2f7; border-radius: 99px; height: 7px; overflow: hidden; }
.distribution-track span { background: linear-gradient(90deg, #7e9bf2, #4c73e4); border-radius: inherit; display: block; height: 100%; }
.dash-width-1 { width: 10%; }.dash-width-2 { width: 20%; }.dash-width-3 { width: 30%; }.dash-width-4 { width: 40%; }.dash-width-5 { width: 50%; }.dash-width-6 { width: 60%; }.dash-width-7 { width: 70%; }.dash-width-8 { width: 80%; }.dash-width-9 { width: 90%; }.dash-width-10 { width: 100%; }
.dashboard-list { display: grid; }
.dashboard-list-row { align-items: center; border-top: 1px solid #eff2f6; color: inherit; display: flex; gap: 11px; min-width: 0; padding: 11px 1px; text-decoration: none; }
.dashboard-list-row:first-child { border-top: 0; padding-top: 0; }
a.dashboard-list-row:hover .dashboard-row-main strong { color: #416de5; }
.dashboard-row-main { display: grid; flex: 1; gap: 4px; min-width: 0; }
.dashboard-row-main strong { color: #29374b; font-size: .77rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-row-main small { color: #8995a7; font-size: .67rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-row-date { color: #8792a4; font-size: .67rem; white-space: nowrap; }
.dashboard-row-amount { color: #35435a; font-size: .69rem; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.dashboard-avatar, .event-date, .transaction-mark, .approval-mark, .followup-mark, .prayer-mark, .notification-mark { align-items: center; background: #edf2ff; border-radius: 11px; color: #5274d3; display: inline-flex; flex: 0 0 36px; height: 36px; justify-content: center; }
.dashboard-avatar { border-radius: 50%; font-size: .78rem; font-weight: 750; }
.event-date { background: #edf2ff; display: grid; gap: 0; height: 42px; line-height: 1; text-align: center; }
.event-date strong { color: #446bd3; font-size: .88rem; }.event-date small { color: #7b8fbe; font-size: .57rem; text-transform: uppercase; }
.row-arrow { color: #97a2b2; font-size: .8rem; }
.transaction-mark { background: #e9f8f0; color: #218754; font-size: 1.15rem; font-weight: 700; }
.transaction-mark.expense, .transaction-mark.reversal { background: #fff0ed; color: #b3544b; }
.transaction-mark.transfer, .transaction-mark.adjustment { background: #f0edff; color: #785bd2; }
.approval-mark { background: #fff5df; color: #9a6b14; font-weight: 800; }
.followup-mark, .prayer-mark { background: #f1edff; color: #7657cb; }
.notification-mark { background: #edf2ff; color: #5474d5; }
.notification-row.unread { background: #f8faff; }
.dashboard-empty { background: #f7f9fc; border-radius: 10px; color: #8591a4; font-size: .76rem; line-height: 1.5; padding: 15px; }
.dashboard-privacy-note { color: #909aab; font-size: .67rem; margin: 10px 0 0; }
.dashboard-scope-pill { background: #eff3ff; border-radius: 99px; color: #6175a4; font-size: .64rem; padding: 6px 9px; white-space: nowrap; }
.dashboard-note { background: #fff8e8; border: 1px solid #f2e2bc; border-radius: 12px; color: #775f2c; font-size: .82rem; margin-bottom: 18px; padding: 13px 16px; }
.dashboard-section-heading { align-items: end; display: flex; justify-content: space-between; margin: 8px 2px 15px; }
.trends-section-title { margin-top: 4px; }
.activity-section-title { margin-top: 30px; }
.dashboard-analytics-grid { align-items: stretch; display: grid; gap: 16px; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr); margin: 0 0 17px; }
.analytics-line-panel, .analytics-source-panel { min-width: 0; }
.analytics-caption { color: #8b96a7; display: block; font-size: .68rem; margin-top: 5px; }
.chart-range-picker { background: #f5f7fb; border-radius: 8px; display: flex; gap: 2px; padding: 3px; }
.chart-range-picker button { background: transparent; border: 0; border-radius: 6px; color: #7f8a9d; font-size: .66rem; padding: 6px 8px; }
.chart-range-picker button.is-active { background: #fff; box-shadow: 0 1px 4px rgba(30,48,80,.12); color: #405fbe; font-weight: 700; }
.analytics-chart-wrap { height: 260px; position: relative; width: 100%; }
.analytics-chart-wrap canvas { display: block; height: 100%; width: 100%; }
.source-chart-wrap { padding-top: 5px; }
.activity-table-panel { margin-bottom: 17px; }
.activity-table-heading { align-items: center; }
.activity-table-filters { align-items: center; display: flex; gap: 8px; }
.activity-table-filters select { max-width: 140px; }
.activity-table-filters input { max-width: 190px; }
.dashboard-activity-table { font-size: .75rem; margin-bottom: 0; min-width: 620px; }
.dashboard-activity-table th { border-bottom-color: #e9edf3; color: #8a95a6; font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dashboard-activity-table th button { background: transparent; border: 0; color: inherit; font: inherit; letter-spacing: inherit; padding: 0; text-transform: inherit; }
.dashboard-activity-table td { border-bottom-color: #eff2f6; color: #68758a; padding: 12px 8px; vertical-align: middle; }
.dashboard-activity-table td:first-child a { color: #29374b; font-weight: 650; text-decoration: none; }
.dashboard-activity-table td:first-child a:hover { color: #416de5; }
.dashboard-activity-table tbody tr[hidden] { display: none; }
.activity-type-pill { background: #edf2ff; border-radius: 99px; color: #5571c5; display: inline-flex; font-size: .63rem; padding: 4px 8px; }
.activity-type-pill.finance { background: #eaf7f0; color: #26875e; }
.activity-type-pill.follow-up { background: #f2edff; color: #7658c4; }
.activity-type-pill.event { background: #fff5df; color: #a17929; }
.activity-detail-cell { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-table-footer { align-items: center; border-top: 1px solid #eff2f6; color: #8a95a6; display: flex; font-size: .69rem; justify-content: space-between; padding-top: 12px; }
.activity-table-footer > div { display: flex; gap: 6px; }
.dashboard-device-columns { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.device-api-instructions { color: #647187; font-size: .78rem; line-height: 1.6; }
.device-endpoint, .device-token-value { background: #f4f6fa; border: 1px solid #e8edf4; border-radius: 8px; color: #34435b; display: block; overflow-wrap: anywhere; padding: 10px 12px; }
.device-payload-example { background: #142033; border-radius: 10px; color: #dbe5f7; font-size: .7rem; overflow-x: auto; padding: 14px; }
.device-token-notice { border-color: #b9dfc8; margin-bottom: 18px; }
.device-token-value { background: #f3fbf6; color: #17633d; font-size: .85rem; margin-bottom: 12px; }
.role-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { align-items: center; background: #f4f6fa; border-radius: 99px; color: #556278; display: inline-flex; font-size: .7rem; gap: 7px; padding: 5px 10px 5px 5px; }
.role-chip > span { align-items: center; background: #e3eaff; border-radius: 50%; color: #4968bd; display: inline-flex; font-size: .6rem; font-weight: 750; height: 23px; justify-content: center; width: 23px; }

@media (max-width: 1199px) {
    .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .dashboard-intro { align-items: flex-start; flex-direction: column; gap: 14px; min-height: auto; padding: 21px 18px; }
    .dashboard-section-title { align-items: flex-start; flex-direction: column; gap: 5px; }
    .dashboard-metrics { gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-metric { gap: 9px; padding: 12px; }
    .dashboard-metric-mark { flex-basis: 6px; height: 35px; }
    .dashboard-metric-content > span { font-size: .68rem; }
    .dashboard-metric-content small { font-size: .6rem; }
    .dashboard-grid, .dashboard-chart-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-panel { padding: 16px; }
    .dashboard-row-amount { font-size: .65rem; }
    .topbar { gap: 10px; padding: 0 14px; }
    .topbar-title { display: none; }
    .global-search { margin-left: 0; max-width: none; width: auto; flex: 1; }
    .account-copy, .account-menu form { display: none; }
    .dashboard-analytics-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-device-columns { grid-template-columns: minmax(0, 1fr); }
    .activity-table-heading { align-items: flex-start; flex-direction: column; }
    .activity-table-filters { width: 100%; }
    .activity-table-filters input { flex: 1; max-width: none; }
}

.attendance-branch-filter { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; max-width: 360px; }
.attendance-branch-filter .form-label { margin: 0; }
.attendance-branch-filter .form-select { flex: 1; min-width: 190px; }
.attendance-metric { min-height: 100px; padding: 16px; }
.attendance-metric strong { font-size: 1.3rem; }
.attendance-chart, .attendance-report-chart { align-items: end; border-bottom: 1px solid var(--line); display: flex; gap: 4px; height: 210px; overflow-x: auto; padding: 14px 2px 0; }
.attendance-chart-column, .attendance-report-bar { align-items: center; display: flex; flex: 1 0 12px; flex-direction: column; height: 100%; justify-content: end; min-width: 12px; }
.attendance-chart-column > span, .attendance-report-bar > span { background: linear-gradient(180deg, #7796f4, #416de5); border-radius: 5px 5px 0 0; min-height: 2px; width: min(100%, 18px); }
.attendance-bar-zero { height: 2%; }
.attendance-bar-1 { height: 10%; }
.attendance-bar-2 { height: 20%; }
.attendance-bar-3 { height: 30%; }
.attendance-bar-4 { height: 40%; }
.attendance-bar-5 { height: 50%; }
.attendance-bar-6 { height: 60%; }
.attendance-bar-7 { height: 70%; }
.attendance-bar-8 { height: 80%; }
.attendance-bar-9 { height: 90%; }
.attendance-bar-10 { height: 100%; }
.attendance-chart-column small, .attendance-report-bar small { color: var(--muted); font-size: .62rem; margin-top: 5px; }
.attendance-chart-legend { color: var(--muted); display: flex; font-size: .75rem; justify-content: space-between; margin-top: 10px; }
.attendance-report-chart { gap: 12px; height: 240px; justify-content: start; }
.attendance-report-bar { flex: 1 0 36px; max-width: 80px; }
.attendance-report-bar > span { width: 60%; }
.attendance-report-value { color: var(--muted); font-size: .68rem; min-height: 18px; }
.attendance-table { font-size: .84rem; margin-bottom: 0; min-width: 650px; }
.attendance-table th { color: #7e899d; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }
.attendance-table td strong, .attendance-table td small { display: block; }
.attendance-table td small { color: var(--muted); font-size: .73rem; margin-top: 3px; }
.attendance-status { background: #edf0f5; border-radius: 999px; color: #69758b; display: inline-block; font-size: .72rem; padding: 5px 9px; }
.attendance-status.present, .attendance-status.visitor { background: #e9f8f0; color: #218754; }
.attendance-status.absent { background: #fff0ed; color: #a34937; }
.attendance-status.excused { background: #fff5df; color: #946a18; }
.attendance-search-results { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(27,46,82,.12); left: 12px; max-height: 250px; overflow-y: auto; position: absolute; right: 12px; top: calc(100% - 20px); z-index: 4; }
.attendance-search-option { background: #fff; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); display: block; font-size: .83rem; padding: 10px 12px; text-align: left; width: 100%; }
.attendance-search-option:hover, .attendance-search-option:focus { background: #f3f6ff; }
.attendance-search-empty { color: var(--muted); font-size: .83rem; padding: 12px; }
.attendance-update-form { align-items: center; display: grid; gap: 5px; grid-template-columns: 105px 1fr auto; min-width: 270px; }
@media print {
    .attendance-search-results, .attendance-branch-filter, .attendance-report-chart { display: none !important; }
}

.finance-metric { min-height: 104px; padding: 15px; }
.finance-metric .metric-icon { flex: 0 0 38px; height: 38px; width: 38px; }
.finance-metric p { font-size: .73rem; }
.finance-metric strong { font-size: .98rem; }
.finance-filter { align-items: end; display: flex; gap: 12px; padding: 14px 18px; }
.finance-filter .form-label { margin: 0; min-width: 95px; }
.finance-filter .form-select { max-width: 280px; }
.finance-table small { color: var(--muted); display: block; font-size: .74rem; margin-top: 3px; }
.finance-table th { white-space: nowrap; }
.finance-status { background: #eef2f8; border-radius: 999px; display: inline-block; font-size: .74rem; font-weight: 700; padding: 5px 9px; }
.finance-status.approved, .finance-status.posted { background: #e8f8f0; color: #218754; }
.finance-status.pending { background: #fff4d9; color: #93650b; }
.finance-status.rejected, .finance-status.reversed, .finance-status.voided { background: #fff0ef; color: #a13e36; }
.finance-actions { min-width: 185px; }
.finance-actions form { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.finance-actions .form-control { min-width: 125px; }
.finance-reject-form { display: flex; flex-wrap: wrap; gap: 5px; }
.financial-report-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 12px; }
.financial-report-heading h2 { font-size: 1.35rem; }
.financial-report-heading p:last-child { color: var(--muted); font-size: .82rem; margin: 0; }
.financial-report-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; margin-top: 20px; padding-top: 10px; }
[data-finance-form] [hidden] { display: none !important; }

.event-branch-filter { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; max-width: 460px; }
.event-branch-filter .form-label { margin: 0; }
.event-branch-filter .form-select { flex: 1; min-width: 190px; }
.event-calendar-card { overflow: hidden; }
.event-calendar-heading { align-items: center; display: flex; justify-content: center; gap: 18px; margin-bottom: 18px; }
.event-calendar-heading h2 { font-size: 1.22rem; margin: 0; min-width: 155px; text-align: center; }
.event-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.event-calendar-weekday { border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 700; padding: 9px 6px; text-align: center; text-transform: uppercase; }
.event-calendar-day { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 112px; padding: 7px; }
.event-calendar-day:nth-child(7n) { border-right: 0; }
.event-calendar-day.outside-month { background: #fafbfd; color: #a5adbc; }
.event-calendar-day.today { background: #f2f5ff; }
.event-calendar-day > time { align-items: center; border-radius: 50%; display: inline-flex; font-size: .78rem; height: 25px; justify-content: center; width: 25px; }
.event-calendar-day.today > time { background: var(--blue); color: #fff; font-weight: 700; }
.event-calendar-items { display: grid; gap: 4px; margin-top: 5px; max-height: 76px; overflow: hidden; }
.event-calendar-item { border-left: 3px solid #416de5; border-radius: 3px; background: #edf2ff; color: #2e4f9e; font-size: .68rem; line-height: 1.35; overflow: hidden; padding: 4px 5px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.event-calendar-item:hover { color: #1d3d87; text-decoration: underline; }
.event-calendar-item.draft { background: #f0f1f4; border-color: #9098a7; color: #606b7c; }
.event-calendar-item.cancelled { background: #fff0ef; border-color: #d66b5e; color: #984a42; }
.event-calendar-item.completed { background: #e9f8f0; border-color: #3ca678; color: #247150; }
.event-calendar-legend { color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.event-calendar-legend span { align-items: center; display: inline-flex; font-size: .75rem; gap: 6px; }
.event-calendar-legend i { background: #416de5; border-radius: 50%; height: 9px; width: 9px; }
.event-calendar-legend .draft { background: #9098a7; }
.event-calendar-legend .cancelled { background: #d66b5e; }
.event-calendar-legend .completed { background: #3ca678; }
.event-table, .event-participant-table { font-size: .84rem; margin-bottom: 0; min-width: 680px; }
.event-table th, .event-participant-table th { color: #7e899d; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.event-table td strong, .event-table td small, .event-participant-table td strong, .event-participant-table td small { display: block; }
.event-table td small, .event-participant-table td small { color: var(--muted); font-size: .74rem; margin-top: 3px; }
.event-title-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.event-title-link:hover { color: var(--blue); text-decoration: underline; }
.event-status, .event-attendance-status { background: #eef2f8; border-radius: 999px; color: #69758b; display: inline-block; font-size: .72rem; font-weight: 700; padding: 5px 9px; }
.event-status.published, .event-attendance-status.checked-in { background: #e9f8f0; color: #218754; }
.event-status.draft { background: #f0f1f4; color: #606b7c; }
.event-status.cancelled { background: #fff0ef; color: #a13e36; }
.event-status.completed { background: #edf2ff; color: #416de5; }
.event-detail-banner { align-items: center; background: linear-gradient(115deg, #eff3ff, #f7f9fd); border-radius: 12px; color: #3159bb; display: flex; font-size: 1.1rem; font-weight: 700; gap: 12px; padding: 18px; }
.event-detail-banner i { font-size: 1.45rem; }
.event-detail-fact { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; gap: 11px; min-height: 66px; padding: 10px 0; }
.event-detail-fact > i { color: var(--blue); font-size: 1.05rem; }
.event-detail-fact div { display: grid; gap: 4px; }
.event-detail-fact small, .event-report-facts small { color: var(--muted); font-size: .75rem; }
.event-detail-fact strong, .event-report-facts strong { font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
.event-description { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.event-description p, .event-report-description { color: #56647a; line-height: 1.75; white-space: normal; }
.event-summary-row { align-items: center; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 13px 0; }
.event-summary-row > span:first-child { color: var(--muted); font-size: .84rem; }
.cancelled-participant { opacity: .62; }
.event-report-heading { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 15px; }
.event-report-heading h2 { font-size: 1.5rem; }
.event-report-heading p:last-child { color: var(--muted); margin: 0; }
.event-report-facts { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.event-report-facts > div { border-bottom: 1px solid var(--line); display: grid; gap: 5px; padding: 8px 0; }
.event-report-roster-title { font-size: 1.05rem; margin: 22px 0 12px; }
[data-participant-member][hidden], [data-participant-visitor][hidden] { display: none !important; }

@media (max-width: 575.98px) {
    .finance-filter { align-items: stretch; flex-direction: column; }
    .finance-filter .form-select { max-width: none; }
    .financial-report-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .event-calendar-card { padding: 14px; }
    .event-calendar-grid { min-width: 630px; }
    .event-calendar-card { overflow-x: auto; }
    .event-calendar-day { min-height: 86px; padding: 4px; }
    .event-calendar-item { font-size: .62rem; }
    .event-report-facts { grid-template-columns: 1fr; }
}

@media print {
    .event-print-actions, .event-branch-filter, .event-calendar-heading a, .event-calendar-legend { display: none !important; }
    .event-report-sheet { border: 0; box-shadow: none; padding: 0; }
    .event-report-heading { border-bottom: 1px solid #777; }
    .event-report-heading h2, .event-report-roster-title { color: #000; }
    .event-report-facts strong, .event-participant-table td { color: #000; }
    .event-participant-table { font-size: 9pt; min-width: 0; }
    .event-participant-table th, .event-participant-table td { background: #fff !important; color: #000 !important; }
}

@media (max-width: 767.98px) {
    .sidebar { box-shadow: 8px 0 25px rgba(18,32,54,.3); transform: translateX(-105%); transition: transform .2s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { background: rgba(12,20,34,.5); border: 0; display: block; inset: 0; opacity: 0; pointer-events: none; position: fixed; transition: opacity .2s ease; z-index: 1090; }
    .sidebar-backdrop.is-visible { opacity: 1; pointer-events: auto; }
    body.sidebar-open { overflow: hidden; }
    .main-area { margin-left: 0; }
    .topbar { gap: 12px; height: 66px; padding: 0 16px; }
    .menu-toggle { display: inline-flex; }
    .topbar-title { margin-right: auto; }
    .account-copy { display: none; }
    .content-area { padding: 22px 16px; }
    .page-intro { align-items: flex-start; flex-direction: column; gap: 14px; }
    .login-card { padding: 27px 22px; }
    .card-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .user-search { max-width: none; }
    .user-create-form { grid-template-columns: 1fr; }
}

.report-filter-card, .report-result-card { padding: 22px; }
.branch-edit-form { max-width: 560px; min-width: 320px; }
.report-scope-line { color: var(--muted); display: flex; flex-wrap: wrap; font-size: .85rem; gap: 6px; margin: -4px 0 18px; }
.report-table { font-size: .88rem; margin: 0; min-width: 650px; }
.report-table thead th { background: #f6f8fc; color: #52617a; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.report-table td { max-width: 280px; overflow-wrap: anywhere; }
.report-chart-wrap { margin: 10px 0 24px; overflow-x: auto; }
.report-chart { display: block; height: auto; max-height: 260px; min-width: 520px; width: 100%; }
.report-chart-axis { stroke: #dfe5ef; stroke-width: 2; }
.report-chart-bar { fill: #5478e8; }
.report-chart text { fill: #5d6980; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 12px; }
.report-print-page { background: #fff; color: #172338; margin: 0 auto; max-width: 1200px; padding: 28px; }
.report-print-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 18px; padding-bottom: 15px; }
.report-print-header h1 { font-size: 1.7rem; }
.report-print-header p:last-child, .report-print-footer { color: var(--muted); font-size: .85rem; }
.report-print-footer { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }

@media print {
    .sidebar, .topbar, .no-print, .sidebar-footer { display: none !important; }
    .main-area { margin: 0 !important; }
    .content-area { padding: 0 !important; }
    .app-shell { display: block; }
    .report-print-page { max-width: none; padding: 0; }
    .report-chart-wrap { overflow: visible; }
    .report-chart { min-width: 0; }
    .report-table { font-size: 8.5pt; min-width: 0; }
    .report-table th, .report-table td { background: #fff !important; color: #111 !important; }
    .report-table thead { display: table-header-group; }
    .report-table tr { break-inside: avoid; }
    .report-print-footer { color: #555; }
}

@media (max-width: 575.98px) {
    .report-filter-card, .report-result-card { padding: 16px; }
    .report-print-header { flex-direction: column; gap: 12px; }
}

:root {
    --v2-gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --v2-gradient-blue: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --v2-gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --v2-gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --v2-gradient-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --v2-gradient-violet: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --v2-gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --v2-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
    --v2-shadow-md: 0 4px 6px -1px rgba(16, 24, 40, .1), 0 2px 4px -2px rgba(16, 24, 40, .1);
    --v2-shadow-lg: 0 10px 15px -3px rgba(16, 24, 40, .1), 0 4px 6px -4px rgba(16, 24, 40, .1);
    --v2-shadow-xl: 0 20px 25px -5px rgba(16, 24, 40, .1), 0 8px 10px -6px rgba(16, 24, 40, .1);
    --v2-radius-sm: 8px;
    --v2-radius-md: 12px;
    --v2-radius-lg: 16px;
    --v2-radius-xl: 20px;
}

.dashboard-hero-v2 {
    position: relative;
    overflow: hidden;
    background: var(--v2-gradient-hero);
    border-radius: var(--v2-radius-xl);
    padding: 32px 36px;
    margin-bottom: 28px;
    box-shadow: var(--v2-shadow-xl);
    color: #fff;
}
.dashboard-hero-v2::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
    border-radius: 50%;
}
.dashboard-hero-v2::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
    border-radius: 50%;
}
.dashboard-hero-v2 > * { position: relative; z-index: 1; }
.dashboard-hero-v2 .hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.dashboard-hero-v2 h1 {
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 0 0 6px;
}
.dashboard-hero-v2 .eyebrow {
    color: rgba(255,255,255,.8);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.dashboard-hero-v2 .hero-subtitle {
    color: rgba(255,255,255,.85);
    font-size: .95rem;
    margin: 0;
    max-width: 520px;
    line-height: 1.6;
}
.dashboard-hero-v2 .hero-date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.22);
    padding: 10px 16px;
    border-radius: 14px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}
.dashboard-hero-v2 .hero-date > span:last-child { display: grid; gap: 2px; }
.dashboard-hero-v2 .hero-date small {
    color: rgba(255,255,255,.75);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .05em;
}
.hero-live-dot {
    background: #4ade80;
    border-radius: 50%;
    height: 9px;
    width: 9px;
    box-shadow: 0 0 0 0 rgba(74,222,128,.7);
    animation: hero-pulse 2s infinite;
}
@keyframes hero-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74,222,128,.7); }
    70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}
.hero-stat-card {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 14px 16px;
    transition: transform .2s ease, background .2s ease;
}
.hero-stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.2);
}
.hero-stat-card small {
    display: block;
    color: rgba(255,255,255,.75);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 5px;
}
.hero-stat-card strong {
    display: block;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.hero-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.hero-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #6366f1;
    border: 0;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--v2-shadow-sm);
    transition: all .18s ease;
}
.hero-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--v2-shadow-md);
    color: #4f46e5;
}
.hero-action-btn.secondary {
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: none;
}
.hero-action-btn.secondary:hover {
    background: rgba(255,255,255,.24);
    color: #fff;
}
.hero-action-btn i { font-size: 1rem; }

.v2-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 0 4px 16px;
    gap: 12px;
}
.v2-section-header h2 {
    color: #0f172a;
    font-size: 1.18rem;
    font-weight: 750;
    letter-spacing: -.025em;
    margin: 0;
}
.v2-section-header .eyebrow {
    font-size: .65rem;
    margin-bottom: 4px;
}
.v2-section-header > span:last-child {
    color: #64748b;
    font-size: .75rem;
    font-weight: 500;
}

.v2-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.v2-metric-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--v2-radius-lg);
    padding: 20px;
    box-shadow: var(--v2-shadow-sm);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.v2-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--v2-gradient-blue);
    opacity: 0;
    transition: opacity .25s ease;
}
.v2-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--v2-shadow-lg);
    border-color: #cbd5e1;
}
.v2-metric-card:hover::before { opacity: 1; }
.v2-metric-card.green::before { background: var(--v2-gradient-green); }
.v2-metric-card.amber::before { background: var(--v2-gradient-amber); }
.v2-metric-card.rose::before { background: var(--v2-gradient-rose); }
.v2-metric-card.violet::before { background: var(--v2-gradient-violet); }
.v2-metric-card.cyan::before { background: var(--v2-gradient-cyan); }

.v2-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}
.v2-metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: var(--v2-gradient-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, .3);
}
.v2-metric-card.green .v2-metric-icon { background: var(--v2-gradient-green); box-shadow: 0 4px 12px rgba(16, 185, 129, .3); }
.v2-metric-card.amber .v2-metric-icon { background: var(--v2-gradient-amber); box-shadow: 0 4px 12px rgba(245, 158, 11, .3); }
.v2-metric-card.rose .v2-metric-icon { background: var(--v2-gradient-rose); box-shadow: 0 4px 12px rgba(244, 63, 94, .3); }
.v2-metric-card.violet .v2-metric-icon { background: var(--v2-gradient-violet); box-shadow: 0 4px 12px rgba(139, 92, 246, .3); }
.v2-metric-card.cyan .v2-metric-icon { background: var(--v2-gradient-cyan); box-shadow: 0 4px 12px rgba(6, 182, 212, .3); }

.v2-metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}
.v2-metric-trend.up { background: #dcfce7; color: #16a34a; }
.v2-metric-trend.down { background: #fee2e2; color: #dc2626; }
.v2-metric-trend.flat { background: #f1f5f9; color: #64748b; }

.v2-metric-label {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.v2-metric-value {
    display: block;
    color: #0f172a;
    font-size: clamp(1.4rem, 1.8vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 6px;
}
.v2-metric-hint {
    display: block;
    color: #94a3b8;
    font-size: .7rem;
    line-height: 1.4;
}
.v2-metric-spark {
    margin-top: 14px;
    height: 40px;
    width: 100%;
}
.v2-metric-spark svg { display: block; height: 100%; width: 100%; overflow: visible; }

.v2-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
.v2-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--v2-radius-lg);
    padding: 22px;
    box-shadow: var(--v2-shadow-sm);
    transition: box-shadow .2s ease;
}
.v2-panel:hover { box-shadow: var(--v2-shadow-md); }
.v2-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 12px;
}
.v2-panel-header h3 {
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -.015em;
    margin: 0;
}
.v2-panel-header .eyebrow {
    font-size: .62rem;
    margin-bottom: 5px;
}
.v2-panel-caption {
    display: block;
    color: #94a3b8;
    font-size: .7rem;
    margin-top: 4px;
    line-height: 1.4;
}
.v2-chart-wrap {
    position: relative;
    width: 100%;
}
.v2-chart-wrap canvas { display: block; width: 100%; }
.v2-line-chart-wrap { height: 280px; }
.v2-donut-chart-wrap { height: 260px; }

.v2-range-tabs {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}
.v2-range-tabs button {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    font-size: .7rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s ease;
}
.v2-range-tabs button.is-active {
    background: #fff;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(15,23,42,.1);
}
.v2-legend-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.v2-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    color: #64748b;
    font-weight: 500;
}
.v2-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
.v2-donut-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}
.v2-donut-stat small {
    display: block;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.v2-donut-stat strong {
    display: block;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.v2-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.v2-list-card { display: flex; flex-direction: column; }
.v2-list {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.v2-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 2px;
    border-top: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}
.v2-list-item:first-child { border-top: 0; padding-top: 4px; }
.v2-list-item:hover { background: #f8fafc; margin: 0 -6px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.v2-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
    font-weight: 700;
}
.v2-list-icon.member { background: #eef2ff; color: #4f46e5; border-radius: 50%; font-size: .78rem; }
.v2-list-icon.event { background: #fff7ed; color: #ea580c; display: grid; gap: 0; line-height: 1; text-align: center; padding: 2px; }
.v2-list-icon.event strong { color: #ea580c; font-size: .92rem; }
.v2-list-icon.event small { color: #9a3412; font-size: .55rem; text-transform: uppercase; font-weight: 600; }
.v2-list-icon.income { background: #ecfdf5; color: #059669; font-size: 1.05rem; }
.v2-list-icon.expense { background: #fef2f2; color: #dc2626; font-size: 1.05rem; }
.v2-list-icon.approval { background: #fefce8; color: #ca8a04; font-weight: 800; }
.v2-list-icon.followup { background: #f5f3ff; color: #7c3aed; }
.v2-list-icon.prayer { background: #fdf4ff; color: #a855f7; }
.v2-list-icon.notif { background: #eff6ff; color: #2563eb; }
.v2-list-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 3px;
}
.v2-list-main strong {
    color: #0f172a;
    font-size: .82rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-list-main small {
    color: #94a3b8;
    font-size: .7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-list-meta {
    text-align: right;
    flex-shrink: 0;
    display: grid;
    gap: 3px;
}
.v2-list-meta .date {
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 500;
}
.v2-list-meta .amount {
    color: #0f172a;
    font-size: .78rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.v2-list-meta .amount.income { color: #059669; }
.v2-list-meta .amount.expense { color: #dc2626; }
.v2-list-arrow {
    color: #cbd5e1;
    font-size: .75rem;
    flex-shrink: 0;
}
.v2-empty {
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: .76rem;
    line-height: 1.6;
}
.v2-empty i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
    opacity: .6;
}
.v2-privacy-note {
    color: #94a3b8;
    font-size: .68rem;
    margin-top: 10px;
    font-style: italic;
}

.v2-activity-table-wrap {
    margin-bottom: 20px;
}
.v2-table-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.v2-table-filters select,
.v2-table-filters input {
    font-size: .78rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 7px 11px;
    color: #334155;
    transition: all .15s ease;
}
.v2-table-filters select:focus,
.v2-table-filters input:focus {
    outline: none;
    background: #fff;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.12);
}
.v2-table-filters input { min-width: 180px; }
.v2-activity-table {
    font-size: .78rem;
    margin-bottom: 0;
    width: 100%;
}
.v2-activity-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
}
.v2-activity-table thead th button {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
    text-transform: inherit;
    letter-spacing: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.v2-activity-table thead th button span { opacity: .5; }
.v2-activity-table tbody td {
    padding: 13px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #475569;
}
.v2-activity-table tbody tr:hover { background: #f8fafc; }
.v2-activity-table tbody td:first-child a {
    color: #0f172a;
    font-weight: 650;
    text-decoration: none;
}
.v2-activity-table tbody td:first-child a:hover { color: #4f46e5; }
.v2-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.v2-type-pill.member { background: #eef2ff; color: #4f46e5; }
.v2-type-pill.event { background: #fff7ed; color: #ea580c; }
.v2-type-pill.finance { background: #ecfdf5; color: #059669; }
.v2-type-pill.follow-up { background: #f5f3ff; color: #7c3aed; }
.v2-type-pill.prayer { background: #fdf4ff; color: #a855f7; }
.v2-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}
.v2-table-footer small {
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 500;
}
.v2-table-footer .pagination {
    display: flex;
    gap: 5px;
}
.v2-table-footer .pagination button {
    padding: 6px 12px;
    font-size: .72rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.v2-table-footer .pagination button:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
.v2-table-footer .pagination button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.v2-dept-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: var(--v2-radius-md);
    padding: 16px 20px;
    margin-bottom: 22px;
}
.v2-dept-banner h3 {
    color: #4338ca;
    font-size: 1rem;
    font-weight: 750;
    margin: 0;
}
.v2-dept-banner .eyebrow { margin-bottom: 3px; color: #6366f1; }
.v2-dept-badge {
    background: #fff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}
.v2-note-banner {
    background: linear-gradient(135deg, #fefce8 0%, #fffbeb 100%);
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: var(--v2-radius-md);
    padding: 14px 18px;
    font-size: .82rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.v2-note-banner i { font-size: 1.1rem; }

.v2-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.v2-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 7px 13px 7px 7px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    color: #334155;
    transition: all .15s ease;
}
.v2-role-chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.v2-role-chip > span:first-child {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 800;
}
.v2-notif-unread {
    background: #eff6ff;
    border-radius: 10px;
    margin: 0 -6px;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

@media (max-width: 1199px) {
    .v2-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .v2-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .v2-analytics-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .dashboard-hero-v2 { padding: 22px 20px; border-radius: 16px; }
    .dashboard-hero-v2 .hero-top { flex-direction: column; gap: 14px; }
    .hero-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hero-stat-card strong { font-size: 1.1rem; }
    .v2-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .v2-metric-card { padding: 16px; }
    .v2-activity-grid { grid-template-columns: minmax(0, 1fr); }
    .v2-panel { padding: 18px; }
    .v2-panel-header { flex-direction: column; gap: 10px; }
    .v2-line-chart-wrap { height: 240px; }
    .v2-section-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .v2-table-filters { width: 100%; }
    .v2-table-filters input { flex: 1; min-width: 0; }
    .v2-dept-banner { flex-direction: column; align-items: flex-start; }
    .v2-activity-table thead th:nth-child(4),
    .v2-activity-table tbody td:nth-child(4) { display: none; }
}
@media (max-width: 480px) {
    .v2-metrics-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-stat-card { padding: 11px 12px; }
    .hero-stat-card strong { font-size: 1rem; }
    .hero-actions-row .hero-action-btn { flex: 1; justify-content: center; }
}

.v2-fade-in {
    animation: v2-fade-up .5s cubic-bezier(.4,0,.2,1) both;
}
.v2-fade-in.delay-1 { animation-delay: .05s; }
.v2-fade-in.delay-2 { animation-delay: .1s; }
.v2-fade-in.delay-3 { animation-delay: .15s; }
.v2-fade-in.delay-4 { animation-delay: .2s; }
.v2-fade-in.delay-5 { animation-delay: .25s; }
.v2-fade-in.delay-6 { animation-delay: .3s; }
@keyframes v2-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.v2-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .74rem;
    color: #64748b;
    margin-bottom: 10px;
}
.v2-progress-row:last-child { margin-bottom: 0; }
.v2-progress-row strong { color: #0f172a; font-weight: 700; font-size: .78rem; }
.v2-progress-track {
    flex: 1;
    height: 7px;
    background: #f1f5f9;
    border-radius: 999px;
    margin: 0 12px;
    overflow: hidden;
}
.v2-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--v2-gradient-blue);
    transition: width .6s ease;
}
.v2-progress-bar.green { background: var(--v2-gradient-green); }
.v2-progress-bar.amber { background: var(--v2-gradient-amber); }
.v2-progress-bar.rose { background: var(--v2-gradient-rose); }
.v2-progress-bar.violet { background: var(--v2-gradient-violet); }
.v2-progress-bar.cyan { background: var(--v2-gradient-cyan); }

.settings-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: .8rem;
    font-weight: 650;
    border-radius: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
    text-decoration: none;
}
.settings-tab:hover {
    color: #334155;
    background: rgba(255,255,255,.7);
}
.settings-tab.is-active {
    background: #fff;
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(15,23,42,.08);
}
.settings-tab i { font-size: .9rem; }
.settings-tab-count {
    background: rgba(79,70,229,.1);
    color: #4f46e5;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
}
.settings-tab:not(.is-active) .settings-tab-count {
    background: #e2e8f0;
    color: #64748b;
}

.settings-panel[hidden] { display: none !important; }

.field-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.field-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
    color: #475569;
    font-size: .78rem;
    font-weight: 650;
}
.form-field label .hint {
    color: #94a3b8;
    font-weight: 500;
    margin-left: 4px;
    font-size: .7rem;
}
.form-field input, .form-field select, .form-field textarea {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 13px;
    font-size: .82rem;
    color: #0f172a;
    transition: all .15s ease;
    font-family: inherit;
    width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none;
    background: #fff;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.12);
}
.form-field textarea { min-height: 90px; resize: vertical; }

.section-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: var(--v2-shadow-sm);
    margin-bottom: 20px;
}
.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 14px;
}
.section-card-header h2 {
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -.015em;
    margin: 0;
    color: #0f172a;
}
.section-card-header .eyebrow { margin-bottom: 4px; }
.section-card-header .section-desc {
    color: #64748b;
    font-size: .74rem;
    line-height: 1.5;
    max-width: 460px;
}
.section-card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-v2 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 11px;
    font-size: .8rem;
    font-weight: 650;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
    font-family: inherit;
}
.btn-v2.primary {
    background: var(--v2-gradient-blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79,70,229,.2);
}
.btn-v2.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79,70,229,.28);
}
.btn-v2.secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.btn-v2.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.btn-v2.ghost {
    background: transparent;
    color: #64748b;
}
.btn-v2.ghost:hover {
    background: #f1f5f9;
    color: #334155;
}
.btn-v2.sm { padding: 7px 13px; font-size: .74rem; border-radius: 9px; }
.btn-v2.lg { padding: 12px 22px; font-size: .85rem; }

.summary-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.summary-stat-tile {
    background: linear-gradient(135deg, #fff 0%, #fafbff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    padding: 16px 18px;
    transition: all .2s ease;
}
.summary-stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--v2-shadow-md);
    border-color: #c7d2fe;
}
.summary-stat-tile small {
    display: block;
    color: #6366f1;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.summary-stat-tile strong {
    display: block;
    color: #1e1b4b;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

@media (max-width: 900px) {
    .field-grid-2, .field-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .summary-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .summary-stats-row { grid-template-columns: minmax(0, 1fr); }
    .section-card { padding: 18px 16px; border-radius: 14px; }
    .settings-tabs { padding: 3px; }
    .settings-tab { padding: 8px 14px; font-size: .75rem; }
}
/* Printable member ID card */
.member-id-card-wrap { display: grid; justify-items: center; gap: 1rem; padding: 1.5rem; }
.member-id-card { width: 340px; height: 215px; max-width: 100%; padding: 14px 16px 10px; border-radius: 16px; color: #142438; background: linear-gradient(135deg, #fff 0%, #f1f6fb 100%); border: 1px solid #d8e2ec; box-shadow: 0 18px 45px rgba(18, 42, 66, .16); display: flex; flex-direction: column; overflow: hidden; }
.member-id-card-header { display: flex; align-items: center; gap: 10px; min-height: 34px; padding-bottom: 8px; border-bottom: 1px solid #dbe5ed; }
.member-id-card-logo, .member-id-card-logo-placeholder { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; object-fit: contain; }
.member-id-card-logo-placeholder { display: grid; place-items: center; color: #52708a; background: #e8f0f6; }
.member-id-card-church { display: grid; min-width: 0; line-height: 1.2; }
.member-id-card-church strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.member-id-card-church small, .member-id-card-footer, .member-id-card-qr-column small { color: #657a8d; font-size: .55rem; letter-spacing: .08em; }
.member-id-card-body { flex: 1; display: grid; grid-template-columns: 64px minmax(0, 1fr) 94px; align-items: center; gap: 11px; padding: 9px 0; }
.member-id-card-photo { width: 64px; height: 78px; border-radius: 8px; object-fit: cover; background: #e3ebf2; }
.member-id-card-photo-placeholder { display: grid; place-items: center; color: #71879a; font-size: 2rem; }
.member-id-card-details { min-width: 0; display: grid; gap: 4px; }
.member-id-card-name { overflow-wrap: anywhere; line-height: 1.15; font-size: .82rem; }
.member-id-card-details > span { color: #126c62; font: 700 .68rem ui-monospace, monospace; }
.member-id-card-details > small { overflow: hidden; color: #657a8d; text-overflow: ellipsis; white-space: nowrap; font-size: .6rem; }
.member-id-card-qr-column { display: grid; justify-items: center; gap: 3px; }
.member-id-card-qr { width: 84px; height: 84px; display: grid; place-items: center; padding: 4px; background: #fff; border: 1px solid #e1e8ef; border-radius: 7px; }
.member-id-card-qr img, .member-id-card-qr canvas { width: 74px !important; height: 74px !important; image-rendering: pixelated; }
.member-id-card-qr.is-unavailable { color: #8a4b00; text-align: center; font-size: .6rem; }
.member-id-card-footer { display: flex; justify-content: space-between; padding-top: 6px; border-top: 1px solid #dbe5ed; font-size: .48rem; letter-spacing: .04em; }
.member-id-card-note { max-width: 520px; margin: 0; color: #617286; text-align: center; font-size: .85rem; }
@media print {
    @page { size: 85.6mm 54mm; margin: 0; }
    body:has(.member-id-card) { background: #fff !important; }
    body:has(.member-id-card) .app-shell { display: block !important; width: 85.6mm !important; height: 54mm !important; min-height: 54mm !important; margin: 0 !important; padding: 0 !important; }
    body:has(.member-id-card) .sidebar, body:has(.member-id-card) .topbar, body:has(.member-id-card) .print-actions,
    body:has(.member-id-card) .member-id-card-note, body:has(.member-id-card) .page-intro,
    body:has(.member-id-card) .sidebar-backdrop, body:has(.member-id-card) .content-area > :not(.member-id-card-wrap) { display: none !important; }
    body:has(.member-id-card) .main-area, body:has(.member-id-card) .content-area { display: block !important; width: 85.6mm !important; min-height: 54mm !important; margin: 0 !important; padding: 0 !important; }
    body:has(.member-id-card) .member-id-card-wrap { display: block !important; width: 85.6mm !important; height: 54mm !important; margin: 0 !important; padding: 0 !important; }
    body:has(.member-id-card) .member-id-card { width: 85.6mm !important; height: 54mm !important; max-width: none !important; padding: 3mm 3.4mm 2mm !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* Public-facing church pages */
.public-site-body { margin: 0; background: #f7f8fc; color: #182137; }
.public-site { min-height: 100vh; font-family: var(--bs-body-font-family, system-ui, sans-serif); }
.public-site-header { min-height: 76px; padding: 18px max(5vw, 24px); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e9edf4; }
.public-site-brand { color: #182137; font-weight: 750; font-size: 1.2rem; text-decoration: none; }
.public-site-header nav { display:flex; align-items:center; flex-wrap:wrap; gap: 20px; }
.public-site-header nav a,.public-site-footer a { color:#536079; text-decoration:none; }
.public-site-header nav a:hover,.public-site-footer a:hover { color:#3157c8; }
.public-hero { padding: clamp(72px, 12vw, 150px) 24px; text-align:center; color:#fff; background:linear-gradient(125deg,#17264b,#3157c8 68%,#7489ed); }
.public-hero p { text-transform:uppercase; letter-spacing:.16em; font-size:.78rem; font-weight:700; opacity:.8; }
.public-hero h1 { color:#fff; font-size:clamp(2.4rem,7vw,5rem); font-weight:800; margin:.4em 0; }
.public-hero span { color:#e5eaff; font-size:1.1rem; }
.public-content { width:min(1120px,92vw); margin:0 auto; padding:64px 0; }
.public-content h1 { font-size:clamp(2.1rem,5vw,3.4rem); font-weight:800; }
.public-page-content { max-width:850px; min-height:65vh; }
.public-page-summary { font-size:1.2rem; color:#596780; margin:20px 0 38px; }
.public-page-body { line-height:1.85; font-size:1.05rem; white-space:normal; }
.public-sermon-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:20px; margin:28px 0; }
.public-sermon-grid article { background:#fff; border:1px solid #e6eaf2; border-radius:16px; padding:24px; box-shadow:0 8px 28px #17264b0a; }
.public-sermon-grid article h2,.public-sermon-grid article h3 { font-weight:750; }
.public-site-footer { padding:24px 5vw; background:#17213a; color:#c7cfe1; }
.public-giving { max-width:720px; }
.public-giving .card { border:1px solid #e6eaf2; border-radius:18px; box-shadow:0 12px 34px #17264b0b; }
@media(max-width:650px){.public-site-header{align-items:flex-start;flex-direction:column}.public-site-header nav{gap:12px 16px}.public-content{padding:40px 0}}
