/* ==================================================================
   LJM Shared Theme — light/dark design system + mobile app-style nav
   Load this AFTER style.css (and after any page inline <style>) on
   every public page: its :root block wins the cascade and re-themes
   existing components that already read the --google-* tokens.
   ================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #faf9f5;
    --bg-soft: #f4f2ec;
    --surface: #ffffff;
    --border: #e8e5dc;
    --border-strong: #d9d5c9;
    --text: #1f1e1a;
    --text-soft: #6e6a5e;
    --text-faint: #a09a8a;
    --accent: #d97757;
    --accent-deep: #c05f3f;
    --accent-soft: #fbeee8;
    --green: #5f8d4e;
    --green-soft: #eef4ea;
    --red: #b3452f;
    --red-soft: #fbeae5;
    --amber: #b98a2e;
    --amber-soft: #f9f1df;
    --info: #3f7a94;
    --info-soft: #e7f0f4;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(60,50,30,0.05), 0 4px 16px rgba(60,50,30,0.06);
    --shadow-lift: 0 2px 6px rgba(60,50,30,0.08), 0 10px 32px rgba(60,50,30,0.10);
    --serif: "Lora", Georgia, serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Back-compat: style.css and inline page styles already read these names.
       Re-pointing them at the tokens above re-themes existing components
       without having to touch every rule in style.css. */
    --google-blue: var(--accent);
    --google-blue-hover: var(--accent-deep);
    --google-blue-light: var(--accent-soft);
    --google-surface: var(--surface);
    --google-bg: var(--bg);
    --google-text: var(--text);
    --google-text-secondary: var(--text-soft);
    --google-border: var(--border);
    --font-heading: var(--serif);
    --font-body: var(--sans);
    --shadow-sm: var(--shadow);
    --shadow-md: var(--shadow);
    --shadow-lg: var(--shadow-lift);
    /* index.html references --text-secondary directly; it was never defined. */
    --text-secondary: var(--text-soft);
}

[data-theme="dark"] {
    /* Warm near-black elevation scale (not pure #000) — softer, more premium
       than a stark OLED black, and consistent with the site's warm-paper
       light theme rather than jumping to a cold blue-black. */
    --bg: #16140f;
    --bg-soft: #1c1a14;
    --surface: #232019;
    --surface-2: #2b2620;
    --border: #38332a;
    --border-strong: #4a4438;
    --text: #f2ede4;
    --text-soft: #bfb7a8;
    --text-faint: #8a8274;
    /* Same hue family as the light-mode terracotta, desaturated/darkened
       one notch so it reads as refined rather than a neon warning color. */
    --accent: #e2825f;
    --accent-deep: #f0a37e;
    --accent-soft: rgba(226,130,95,0.14);
    --green: #7fb56a;
    --green-soft: rgba(127,181,106,0.14);
    --red: #e0705c;
    --red-soft: rgba(224,112,92,0.14);
    --amber: #dcb35c;
    --amber-soft: rgba(220,179,92,0.14);
    --info: #6fa8c2;
    --info-soft: rgba(111,168,194,0.14);
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lift: 0 4px 16px rgba(0,0,0,0.5), 0 12px 32px rgba(0,0,0,0.6);
    color-scheme: dark;
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
    background: var(--bg) !important;
    color: var(--text) !important;
    position: relative;
}

body::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background: url('motto-banner-2026.jpeg') no-repeat center center fixed !important;
    background-size: cover !important;
    opacity: 0.15 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

h1, h2, h3, h4, .fund-heading h2, .insight-modal-title, .page-heading, .top-title, .insights-title {
    font-family: var(--serif) !important;
}

/* ==================================================================
   Shared top header (built by header.js) — "Light of Jesus Ministry".
   Warm, minimal, editorial look matching the admin console. Overrides the
   old purple .navbar entirely (header.js swaps the class to .ljm-header).
   ================================================================== */
.ljm-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
    /* reset stray properties from the old .navbar / inline page styles */
    color: var(--text);
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    display: block;
}
.ljmh-inner {
    max-width: 1180px;
    margin: 0 auto;
    height: 62px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.ljmh-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}
.ljmh-mark {
    display: inline-flex;
    width: 34px; height: 34px;
    align-items: center; justify-content: center;
    border-radius: 10px;
    background: transparent;
    flex-shrink: 0;
}
.ljmh-mark svg { width: 20px; height: 20px; }
.ljmh-word {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.ljmh-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}
.ljmh-nav a {
    text-decoration: none;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 13px;
    border-radius: 9px;
    transition: background .15s, color .15s;
}
.ljmh-nav a:hover { background: var(--bg-soft); color: var(--text); }
.ljmh-nav a.active { color: var(--accent-deep); font-weight: 600; background: var(--accent-soft); }
.ljmh-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Fund switcher */
.ljmh-fundswitch { position: relative; }
.ljmh-fundbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: 600 13px var(--sans);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ljmh-fundbtn:hover { border-color: var(--accent); }
.ljmh-fundswitch.open .ljmh-fundbtn { border-color: var(--accent); background: var(--bg-soft); }
.ljmh-fund-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ljmh-fund-ic { display: inline-flex; color: var(--accent-deep); }
.ljmh-fundlabel { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ljmh-fundchev svg { width: 15px; height: 15px; transition: transform .18s; }
.ljmh-fundswitch.open .ljmh-fundchev svg { transform: rotate(180deg); }
/* The explicit display below would defeat the markup's `hidden` attribute,
   leaving the menu permanently open — force-respect it. */
.ljmh-fundmenu[hidden] { display: none !important; }
.ljmh-fundmenu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: ljmhPop .16s ease;
    z-index: 20;
}
@keyframes ljmhPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ljmh-fundopt {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
}
.ljmh-fundopt:hover { background: var(--bg-soft); }
.ljmh-fundopt.ljmh-fund-active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.ljmh-fundempty { padding: 12px; font-size: 13px; color: var(--text-faint); text-align: center; }

/* Theme toggle (now on a light surface, not the purple bar) */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .15s, color .15s, transform .12s;
}
.theme-toggle-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.theme-toggle-btn:active { transform: scale(0.92); }
.theme-toggle-btn svg {
    width: 18px; height: 18px;
    fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Auth cluster */
.ljmh-auth { display: inline-flex; align-items: center; gap: 10px; }
.ljmh-userinfo { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.ljmh-admin {
    font-size: 12.5px; font-weight: 700; text-decoration: none;
    color: var(--accent-deep); border: 1px dashed var(--accent);
    padding: 4px 9px; border-radius: 8px; white-space: nowrap;
}
.ljmh-signin {
    display: inline-flex; align-items: center;
    height: 36px; padding: 0 16px;
    border-radius: 999px;
    background: var(--accent); color: #fff;
    font: 600 13px var(--sans); text-decoration: none;
    white-space: nowrap; transition: background .15s;
}
.ljmh-signin:hover { background: var(--accent-deep); }
.ljmh-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff; font-weight: 700; font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    border: none; padding: 0; cursor: pointer;
}
.ljmh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ljmh-avatar-static { cursor: default; font-size: 17px; }

/* Avatar dropdown menu */
.ljmh-auth { position: relative; }
.ljmh-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 6px;
    z-index: 30;
    animation: ljmhPop .16s ease;
}
.ljmh-menu[hidden] { display: none !important; }
.ljmh-menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.ljmh-menu-name { font-weight: 700; font-size: 14px; color: var(--text); }
.ljmh-menu-email { font-size: 12px; color: var(--text-faint); margin-top: 1px; word-break: break-all; }
.ljmh-menu-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 12px; border-radius: 9px;
    border: none; background: transparent; cursor: pointer;
    color: var(--text); font: 500 13.5px var(--sans);
    text-decoration: none; text-align: left;
}
.ljmh-menu-item:hover { background: var(--bg-soft); }
.ljmh-menu-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ljmh-menu-signout { color: var(--red); }
.ljmh-menu-signout:hover { background: var(--red-soft); }

/* ==================================================================
   "More" slide-up sheet (mobile bottom nav overflow)
   ================================================================== */
/* Must stack above the bottom nav (style.css forces it to z-index 9999). */
#ljmhMoreSheet { position: fixed; inset: 0; z-index: 12000; }
#ljmhMoreSheet[hidden] { display: none !important; }
.ljmh-sheet-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 12, 6, 0.5);
    opacity: 0; transition: opacity .2s;
}
#ljmhMoreSheet.open .ljmh-sheet-backdrop { opacity: 1; }
.ljmh-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px 22px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -12px 40px rgba(0,0,0,0.25);
    padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1);
}
#ljmhMoreSheet.open .ljmh-sheet { transform: translateY(0); }
.ljmh-sheet-grip {
    width: 40px; height: 4px; border-radius: 999px;
    background: var(--border-strong);
    margin: 4px auto 12px;
}
.ljmh-sheet-user {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 4px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.ljmh-sheet-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ljmh-sheet-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text); font: 600 13.5px var(--sans);
    text-decoration: none; cursor: pointer;
    transition: background-color 0.2s, transform 0.15s ease;
}
.ljmh-sheet-item:active {
    transform: scale(0.98);
}
.ljmh-sheet-item::after {
    content: "›";
    margin-left: auto;
    font-size: 20px;
    color: var(--text-faint);
    font-weight: 300;
    line-height: 1;
}
.ljmh-sheet-item.active { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.ljmh-sheet-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ljmh-sheet-signout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%; margin-top: 14px; padding: 14px;
    border-radius: 14px; border: 1px solid var(--border);
    background: transparent; cursor: pointer;
    color: var(--red); font: 600 13.5px var(--sans);
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s ease;
}
.ljmh-sheet-signout:active {
    transform: scale(0.98);
}
.ljmh-sheet-signout svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ljmh-sheet-signin { color: var(--accent-deep); }

/* The More tab is a <button>; align it with the anchor tabs. */
button.bottom-nav-item {
    background: transparent; border: none; cursor: pointer;
    font-family: var(--sans);
}

/* style.css only reveals .bottom-nav ≤768px while the shell header collapses
   at 820px — bridge the 769–820px gap so there is never a nav-less zone. */
@media (max-width: 820px) {
    .bottom-nav { display: flex !important; }
    body { padding-bottom: 84px !important; }
}
@media (min-width: 821px) {
    .bottom-nav, #ljmhMoreSheet { display: none !important; }
}

/* ---- Mobile header: nav lives in the bottom tab bar, so top bar is compact ---- */
@media (max-width: 820px) {
    .ljmh-inner { height: 56px; padding: 0 12px; gap: 9px; }
    .ljmh-nav { display: none; }
    /* Let the brand shrink and truncate so the action cluster never clips. */
    .ljmh-brand { flex: 0 1 auto; min-width: 0; gap: 8px; }
    .ljmh-word { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ljmh-actions { flex-shrink: 0; gap: 8px; }
    .ljmh-fundlabel { display: none; }
    .ljmh-fundbtn { padding: 0 10px; height: 34px; }
    .theme-toggle-btn { width: 34px; height: 34px; }
    .ljmh-userinfo, .ljmh-admin { display: none !important; }
    /* The full Google button is too wide for the compact mobile bar; on the
       home page sign-in happens via the in-page member card instead. */
    .ljmh-auth-gis { display: none !important; }
    .ljmh-signin { height: 34px; padding: 0 13px; font-size: 12.5px; }
    .ljmh-avatar { width: 34px; height: 34px; font-size: 14px; }
    /* Keep the menu absolute (drops below the button). A fixed bottom-sheet
       breaks here because the header's backdrop-filter becomes the containing
       block for fixed descendants, throwing the sheet off-screen. */
    .ljmh-fundmenu { right: 0; left: auto; min-width: 210px; max-width: 78vw; }
}
@media (max-width: 380px) {
    /* Very narrow phones: keep only the mark + short wordmark. */
    .ljmh-word { font-size: 13.5px; }
}

/* ==================================================================
   Dark-mode overrides for hardcoded light surfaces across style.css
   and the page-specific inline <style> blocks (members/impact/about).
   Everything below only applies when [data-theme="dark"] is set.
   ================================================================== */
[data-theme="dark"] body::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background: url('motto-banner-2026.jpeg') no-repeat center center fixed !important;
    background-size: cover !important;
    opacity: 0.12 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .contributor-card,
[data-theme="dark"] .top-card,
[data-theme="dark"] .member-card,
[data-theme="dark"] .insight-card,
[data-theme="dark"] .insight-modal-content,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .card,
[data-theme="dark"] .fund-card,
[data-theme="dark"] .wishlist-item,
[data-theme="dark"] .activity-row {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text);
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .stat-card h3,
[data-theme="dark"] .insight-modal-title,
[data-theme="dark"] .top-title,
[data-theme="dark"] .page-heading,
[data-theme="dark"] .contributor-name,
[data-theme="dark"] .member-name,
[data-theme="dark"] .activity-name {
    color: var(--text) !important;
}

[data-theme="dark"] .stat-card .stat-value,
[data-theme="dark"] .stat-card .stat-value.goal {
    color: var(--text) !important;
}

[data-theme="dark"] .stat-card .stat-subdetail,
[data-theme="dark"] .insight-modal-body,
[data-theme="dark"] .contributor-count,
[data-theme="dark"] .empty-state p,
[data-theme="dark"] .activity-meta {
    color: var(--text-soft) !important;
}

[data-theme="dark"] .empty-state { border-color: var(--border-strong) !important; }
[data-theme="dark"] .empty-state h3 { color: var(--accent) !important; }

[data-theme="dark"] .insight-modal-backdrop,
[data-theme="dark"] #contribModalBackdrop {
    background: rgba(0,0,0,0.7) !important;
}

[data-theme="dark"] .insight-modal-close {
    background: var(--bg-soft) !important;
    color: var(--text) !important;
}
[data-theme="dark"] .insight-modal-close:hover {
    background: var(--accent-soft) !important;
    color: var(--accent-deep) !important;
}

[data-theme="dark"] .verse-card {
    background: linear-gradient(135deg, rgba(226,145,106,0.10), rgba(226,145,106,0.04)) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .verse-text { color: var(--text) !important; }
[data-theme="dark"] .verse-ref { color: var(--accent) !important; }

[data-theme="dark"] .progress-container { background: var(--bg-soft) !important; }

[data-theme="dark"] .progress-visual-wrapper {
    background: var(--surface) !important;
    border: 1px solid var(--border);
}
[data-theme="dark"] .giving-pace {
    background: var(--accent-soft) !important;
    color: var(--text-soft) !important;
}
[data-theme="dark"] .giving-pace-breakdown { color: var(--text-faint) !important; }

[data-theme="dark"] .google-card-header h3 { color: var(--text) !important; }
[data-theme="dark"] .google-card-header p { color: var(--text-soft) !important; }

[data-theme="dark"] .stat-mini-card,
[data-theme="dark"] .chart-container {
    background: var(--bg-soft) !important;
    border: 1px solid var(--border);
}
[data-theme="dark"] .stat-mini-label,
[data-theme="dark"] .contributor-growth-summary {
    color: var(--text-soft) !important;
}

/* about.html */
[data-theme="dark"] .about-card,
[data-theme="dark"] .verse-item,
[data-theme="dark"] .connect-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .about-card h3,
[data-theme="dark"] .verses-title,
[data-theme="dark"] .verse-item blockquote,
[data-theme="dark"] .connect-card span {
    color: var(--text) !important;
}
[data-theme="dark"] .about-card p { color: var(--text-soft) !important; }
[data-theme="dark"] .verse-item cite { color: var(--accent) !important; }
[data-theme="dark"] .motivation-card {
    background: linear-gradient(135deg, var(--accent-soft), transparent) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] #searchInput,
[data-theme="dark"] #memberSearch,
[data-theme="dark"] .contrib-input {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border-strong) !important;
}
[data-theme="dark"] #searchInput::placeholder,
[data-theme="dark"] #memberSearch::placeholder { color: var(--text-faint) !important; }
[data-theme="dark"] #searchInput:focus { background: var(--surface) !important; }

[data-theme="dark"] .contributor-detail-list th,
[data-theme="dark"] table th {
    color: var(--text-soft) !important;
    border-color: var(--border-strong) !important;
}
[data-theme="dark"] .contributor-detail-list td,
[data-theme="dark"] table td {
    color: var(--text) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .google-card-wrapper,
[data-theme="dark"] .logged-in-profile,
[data-theme="dark"] .link-suggestion-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text);
}

[data-theme="dark"] .bottom-nav {
    background: rgba(28, 26, 20, 0.88) !important;
    border-top-color: var(--border) !important;
}
[data-theme="dark"] .bottom-nav-item { color: var(--text-faint) !important; }
[data-theme="dark"] .bottom-nav-item.active { color: var(--accent) !important; }
[data-theme="dark"] .bottom-nav-item.action-btn { border-color: var(--bg) !important; }

[data-theme="dark"] #debugConsole { background: #000 !important; }

[data-theme="dark"] .payment-modal-content,
[data-theme="dark"] .modal-content {
    background: var(--surface) !important;
    color: var(--text) !important;
}

/* ==================================================================
   Sandha page
   ================================================================== */
.sandha-hero { text-align: center; padding: 34px 16px 10px; }
.sh-icon { font-size: 44px; }
.sh-title { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--text); margin: 10px 0 8px; }
.sh-sub { font-size: 15px; color: var(--text-soft); max-width: 560px; margin: 0 auto; line-height: 1.55; }

.sandha-me {
    display: flex; align-items: center; gap: 14px;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 18px 0 4px;
    border: 1px solid var(--border);
}
.sandha-me.is-paid { background: var(--green-soft); border-color: var(--green); }
.sandha-me.is-pending { background: var(--amber-soft); border-color: var(--amber); }
.sandha-me .sm-icon { font-size: 30px; flex-shrink: 0; }
.sandha-me strong { display: block; font-family: var(--serif); font-size: 16.5px; color: var(--text); margin-bottom: 2px; }
.sandha-me span:not(.sm-icon) { font-size: 13.5px; color: var(--text-soft); line-height: 1.45; }

.sandha-controls {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 14px; margin: 20px 0 22px;
}
.sandha-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; }
.sandha-kpi {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 10px 16px; text-align: center;
}
.sk-value { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); }
.sk-value span { font-size: 14px; color: var(--text-faint); font-weight: 600; }
.sk-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-top: 1px; }
.sandha-progress {
    flex: 1 1 140px; height: 8px; border-radius: 999px;
    background: var(--bg-soft); overflow: hidden; min-width: 120px;
}
.sandha-progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--accent)); border-radius: 999px; transition: width .6s ease; }
.sandha-monthrow { display: flex; align-items: center; gap: 8px; }
.sandha-monthlabel { font-size: 12.5px; font-weight: 700; color: var(--text-soft); }
.sandha-monthinput { max-width: 175px; }

.sandha-lists {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 720px) { .sandha-lists { grid-template-columns: 1fr; } }
.sandha-col-title {
    font-family: var(--serif); font-size: 17px; color: var(--text);
    margin: 0 0 12px;
}
.sandha-col-title span { color: var(--text-faint); font-size: 14px; }
.sandha-grid { display: flex; flex-direction: column; gap: 8px; }
.sandha-person {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 14px;
}
.sandha-person.is-paid { border-left: 3px solid var(--green); }
.sandha-person:not(.is-paid) { border-left: 3px solid var(--amber); opacity: 0.92; }
.sp-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff; font-weight: 700; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center;
}
.sandha-person.is-paid .sp-avatar { background: linear-gradient(135deg, var(--green), #4a7040); }
.sp-name { flex: 1; font-weight: 600; font-size: 14px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-meta { font-size: 11.5px; color: var(--text-faint); flex-shrink: 0; }
.sandha-loading { color: var(--text-faint); font-size: 13.5px; text-align: center; padding: 18px 8px; }
.sandha-note { text-align: center; font-size: 12.5px; color: var(--text-faint); margin: 26px 0 10px; }

.ljm-top-bar {
    background: var(--bg-soft);
    color: var(--text-soft);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ljm-top-bar a.ljm-top-item {
    color: inherit;
    text-decoration: none;
    border-radius: 6px;
    padding: 1px 3px;
    margin: -1px -3px;
    transition: color .15s, background .15s;
}
.ljm-top-bar a.ljm-top-item:hover,
.ljm-top-bar a.ljm-top-item:active {
    color: var(--accent-deep);
    background: var(--accent-soft);
}
.ljm-top-primary,
.ljm-top-secondary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ljm-top-divider {
    color: var(--border-strong);
    user-select: none;
}
/* Below 580px, keep the tappable phone/email links always reachable —
   only the descriptive name/address text collapses away — instead of the
   whole bar (and the only way to reach pastor contact info) disappearing. */
@media (max-width: 580px) {
    .ljm-top-bar {
        gap: 8px;
        font-size: 10.5px;
        padding: 5px 10px;
    }
    .ljm-top-secondary,
    .ljm-top-divider-sec {
        display: none;
    }
}

/* ==================================================================
   Welcome gate (portal-telemetry.js) — branded sign-in / guest card
   ================================================================== */
.ljm-gate-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-lift);
    max-width: 400px;
    width: 100%;
    padding: 34px 28px 26px;
    text-align: center;
    font-family: var(--sans);
    animation: ljmhPop .22s ease;
}
.ljm-gate-mark { font-size: 42px; margin-bottom: 10px; }
.ljm-gate-title { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--text); }
.ljm-gate-sub { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); margin: 4px 0 12px; }
.ljm-gate-body { font-size: 14px; line-height: 1.55; color: var(--text-soft); margin-bottom: 20px; }
.ljm-gate-guest {
    display: block; width: 100%; margin-top: 14px; padding: 11px;
    background: transparent; border: 1px solid var(--border-strong);
    border-radius: 999px; cursor: pointer;
    color: var(--text-soft); font: 600 13.5px var(--sans);
}
.ljm-gate-guest:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ==================================================================
   Member mapping picker options
   ================================================================== */
.mapping-option {
    display: block; width: 100%; text-align: left;
    padding: 11px 14px; border-radius: 11px;
    background: var(--bg-soft, #f4f2ec);
    border: 1px solid var(--border, #e8e5dc);
    color: var(--text, #1f1e1a);
    font: 600 14px var(--sans, sans-serif);
    cursor: pointer;
    transition: border-color .12s, background .12s;
}
.mapping-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.mapping-option span { font-weight: 500; font-size: 12px; color: var(--text-soft); }
.mapping-suggested {
    border-color: var(--accent);
    background: var(--accent-soft);
    margin-bottom: 10px;
}

/* ==================================================================
   Admin welcome banner on the dashboard
   ================================================================== */
.admin-banner { margin: 14px 0 6px; }
.admin-banner-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    background: linear-gradient(120deg, var(--accent-soft), transparent);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 14px 18px;
}
.admin-banner-text { display: flex; flex-direction: column; gap: 2px; }
.admin-banner-text strong { font-family: var(--serif); font-size: 16.5px; color: var(--text); }
.admin-banner-text span { font-size: 13px; color: var(--text-soft); }
.admin-banner-cta {
    display: inline-flex; align-items: center;
    padding: 9px 18px; border-radius: 999px;
    background: var(--accent); color: #fff;
    font: 600 13px var(--sans); text-decoration: none;
    white-space: nowrap;
}
.admin-banner-cta:hover { background: var(--accent-deep); }

/* ==================================================================
   Verse cards — pastor-curated Verse of the Month / Year, prominent
   on the dashboard (mirrors the physical cards handed out at church).
   ================================================================== */
.verse-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 22px 0 28px;
}
.verse-card-lg {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.verse-card-lg.vc-year { border-left-color: var(--amber); }
.verse-card-lg::after {
    content: "\201C";
    position: absolute;
    top: -18px; right: 10px;
    font-family: var(--serif);
    font-size: 120px;
    line-height: 1;
    color: var(--accent);
    opacity: 0.07;
    pointer-events: none;
}
.vc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.vc-badge {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-deep);
    background: var(--accent-soft);
    padding: 4px 11px;
    border-radius: 999px;
    white-space: nowrap;
}
.vc-year .vc-badge { color: var(--amber); background: var(--amber-soft); }
.vc-label { font-size: 12.5px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.vc-text {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 10px;
    font-style: italic;
    position: relative;
    z-index: 1;
}
.vc-ref {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--accent-deep);
    font-style: normal;
}
.vc-year .vc-ref { color: var(--amber); }
@media (max-width: 760px) {
    .verse-cards { grid-template-columns: 1fr; gap: 12px; margin: 16px 0 22px; }
    .vc-text { font-size: 17px; }
}

/* ==================================================================
   Public "Operating Expenses" section on the impact page.
   ================================================================== */
.pub-expenses { margin: 40px 0 20px; }
.pe-title {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    margin: 0 0 6px;
}
.pe-sub { text-align: center; color: var(--text-soft); font-size: 14.5px; max-width: 640px; margin: 0 auto 22px; line-height: 1.5; }
.pe-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: center;
    margin-bottom: 20px;
}
.pe-kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 20px;
    text-align: center;
}
.pe-k-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.pe-k-value { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--text); margin-top: 3px; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pe-chip {
    background: var(--accent-soft);
    color: var(--accent-deep);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 12.5px;
    font-weight: 600;
}
.pe-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.pe-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 18px;
    box-shadow: var(--shadow);
}
.pe-row.pe-planned { border-style: dashed; opacity: 0.92; }
.pe-ic {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.pe-main { flex: 1; min-width: 0; }
.pe-name { font-weight: 600; font-size: 14.5px; color: var(--text); }
.pe-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.pe-amt { font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--text); flex-shrink: 0; }
.pe-badge {
    display: inline-block;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--amber); background: var(--amber-soft);
    padding: 1px 7px; border-radius: 999px; vertical-align: middle;
}
.pe-badge.pe-rec { color: var(--accent-deep); background: var(--accent-soft); }
@media (max-width: 600px) {
    .pe-title { font-size: 21px; }
    .pe-amt { font-size: 15px; }
}

/* ==================================================================
   Recent Activity feed (new "advanced dashboard" section)
   ================================================================== */
.recent-activity-section { margin: 28px 0 32px; }
.recent-activity-section .section-title { text-align: center; margin-bottom: 16px; }
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto;
}
.activity-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e8e5dc);
    border-radius: var(--radius, 14px);
    padding: 12px 16px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.activity-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift, 0 8px 24px rgba(0,0,0,0.08)); }
.activity-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #d97757), var(--accent-deep, #c05f3f));
    color: #fff; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.activity-main { flex: 1; min-width: 0; }
.activity-name { font-weight: 600; font-size: 14px; color: var(--text, #1f1e1a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { font-size: 12px; color: var(--text-soft, #6e6a5e); margin-top: 2px; }
.activity-amount { font-weight: 700; font-size: 15px; color: var(--green, #5f8d4e); flex-shrink: 0; }

/* ==================================================================
   Enhanced-stats dedicated container (previously hijacked the first
   .chart-card via querySelector — now has its own slot in the DOM)
   ================================================================== */
#enhancedStatsContainer {
    grid-column: 1 / -1;
}

/* ==================================================================
   Bottom nav SVG icon upgrade (Instagram/WhatsApp-style outline icons,
   injected by theme.js in place of the emoji spans)
   ================================================================== */
.bottom-nav-item .nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}
.bottom-nav-item.action-btn .nav-icon svg { width: 24px; height: 24px; stroke-width: 2; }

/* ==================================================================
   Dark-mode pass 2: every remaining hardcoded near-black/grey text
   color found by reading style.css and the inline <style> blocks in
   full (members/impact/about), grouped by page. The old purple/indigo
   brand gradient has been removed from every stylesheet (replaced with
   the shared --accent tokens above), so there is nothing "left alone"
   to flag here anymore; this section only overrides illegible
   dark-on-dark text and stray white-only card backgrounds.
   ================================================================== */

/* index.html: Top Contributors leaderboard cards */
[data-theme="dark"] .top-card .amount { color: var(--text) !important; }
[data-theme="dark"] .top-card .amount-label { color: var(--text-soft) !important; }
[data-theme="dark"] .top-card .meta span:first-child { color: var(--text-soft) !important; }
[data-theme="dark"] .top-card .rank-text { color: var(--amber) !important; }

/* index.html: "how we calculate" insight modal metric grid */
[data-theme="dark"] .human-insight { background: var(--bg-soft) !important; }
[data-theme="dark"] .metric-item {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .metric-item .label { color: var(--text-soft) !important; }
[data-theme="dark"] .metric-item .value,
[data-theme="dark"] .insight-primary,
[data-theme="dark"] .insight-modal-summary {
    color: var(--text) !important;
}

/* index.html: Giving Insights cards */
[data-theme="dark"] .insight-label { color: var(--text) !important; }
[data-theme="dark"] .insight-detail { color: var(--text-soft) !important; }

/* index.html: member deep-dive modal (click a Top Contributor card) */
[data-theme="dark"] .member-profile-header {
    background: var(--bg-soft) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .profile-stats .label { color: var(--text-soft) !important; }
[data-theme="dark"] .month-box {
    background: var(--bg-soft) !important;
    border-color: var(--border) !important;
    color: var(--text-soft);
}
[data-theme="dark"] .month-box.paid {
    background: var(--green-soft) !important;
    border-color: var(--green) !important;
    color: var(--green) !important;
}
[data-theme="dark"] .month-box.pending { color: var(--text-faint) !important; }
[data-theme="dark"] .member-deep-timeline { border-color: var(--border) !important; }
[data-theme="dark"] .deep-timeline-item { border-color: var(--border) !important; }
[data-theme="dark"] .deep-timeline-item .date { color: var(--text-soft) !important; }
[data-theme="dark"] .deep-timeline-item .amt { color: var(--text) !important; }
[data-theme="dark"] .deep-timeline-item .cat {
    background: var(--bg-soft) !important;
    color: var(--text-soft) !important;
}

/* funds.html */
[data-theme="dark"] .page-subtitle { color: var(--text-soft) !important; }
[data-theme="dark"] .fund-card p { color: var(--text-soft) !important; }

/* about.html: motivation banner + connect section */
[data-theme="dark"] .about-subtitle { color: var(--text-soft) !important; }
[data-theme="dark"] .motivation-card h2,
[data-theme="dark"] .about-connect h2 {
    color: var(--text) !important;
}
[data-theme="dark"] .motivation-card p { color: var(--text-soft) !important; }
[data-theme="dark"] .connect-card { color: var(--text) !important; }

/* impact.html ("What We Bought" gallery) */
[data-theme="dark"] .impact-hero p.hero-sub { color: var(--text-soft) !important; }
[data-theme="dark"] .impact-total-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .impact-total-card .label { color: var(--text-faint) !important; }
[data-theme="dark"] .filter-chip {
    background: var(--surface) !important;
    border-color: var(--border-strong) !important;
    color: var(--text-soft) !important;
}
[data-theme="dark"] .product-card {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}
[data-theme="dark"] .product-body h3,
[data-theme="dark"] .product-cost {
    color: var(--text) !important;
}
[data-theme="dark"] .product-meta { color: var(--text-faint) !important; }
[data-theme="dark"] .product-desc { color: var(--text-soft) !important; }
[data-theme="dark"] .impact-empty { color: var(--text-soft) !important; }
[data-theme="dark"] .impact-empty h3 { color: var(--text) !important; }
[data-theme="dark"] .impact-modal-card {
    background: var(--surface) !important;
    color: var(--text);
}
[data-theme="dark"] .impact-modal-close {
    background: var(--bg-soft) !important;
    color: var(--text) !important;
}
[data-theme="dark"] .impact-modal-body h2,
[data-theme="dark"] .fb-row .fb-amount,
[data-theme="dark"] .modal-fb-title {
    color: var(--text) !important;
}
[data-theme="dark"] .impact-modal-body .meta-row,
[data-theme="dark"] .impact-modal-body p.desc,
[data-theme="dark"] .fb-row,
[data-theme="dark"] .modal-fb-row {
    color: var(--text-soft) !important;
}
[data-theme="dark"] .modal-fb-note { color: var(--text-faint) !important; }
[data-theme="dark"] .funding-breakdown,
[data-theme="dark"] .modal-fb {
    border-color: var(--border) !important;
}

/* script.js renders several bits of text with hardcoded inline `style="color:#..."`
   (trend labels, modal headers, error/empty states) rather than a class — a plain
   CSS class rule can't win against an inline style, so match by substring on the
   inline style attribute itself instead of editing every innerHTML template. */
[data-theme="dark"] [style*="64748b"],
[data-theme="dark"] [style*="6c757d"] {
    color: var(--text-soft) !important;
}
[data-theme="dark"] [style*="1e293b"],
[data-theme="dark"] [style*="2c3e50"],
[data-theme="dark"] [style*="0f172a"] {
    color: var(--text) !important;
}

/* ==================================================================
   Hero Greeting Section
   ================================================================== */

.hero-greeting {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    padding: 32px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-lift);
}

.greeting-content {
    text-align: center;
}

.greeting-text {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin: 0 0 8px;
    font-family: var(--serif);
}

.greeting-note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

[data-theme="dark"] .hero-greeting {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
}

[data-theme="dark"] .greeting-text {
    color: white;
}

[data-theme="dark"] .greeting-note {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================================================================
   Part 2: Dashboard Redesign — Tabs & KPI Chips
   ================================================================== */

/* Tabbed content system */
.dashboard-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin: 0 0 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 8px;
    /* Stay visible while a tall tab (e.g. Analytics) scrolls beneath it,
       instead of scrolling away with the content — pin it right under the
       sticky brand header so switching tabs never requires scrolling back up. */
    position: sticky;
    top: 62px;
    z-index: 40;
    background: var(--bg);
}
@media (max-width: 820px) {
    .dashboard-tabs { top: 56px; }
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -11px;
    font-family: var(--sans);
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-panels {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* KPI Chip Strip — 5 compact cards showing all key metrics */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 16px 0 24px;
}

.kpi-chip {
    padding: 12px !important;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.kpi-chip:hover {
    border-color: var(--accent) !important;
    box-shadow: var(--shadow-lift) !important;
}

.kpi-chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-faint);
}

.kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.kpi-sub {
    font-size: 10px;
    color: var(--text-soft);
    line-height: 1.3;
}

/* KPI Progress Ring (donut mini) */
.kpi-progress {
    position: relative;
}

.kpi-ring-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-ring-wrapper canvas {
    max-width: 100%;
    height: auto;
}

/* Dark theme for tabs and KPI chips */
[data-theme="dark"] .dashboard-tabs {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .tab-btn {
    color: var(--text-soft);
}

[data-theme="dark"] .tab-btn:hover {
    color: var(--text);
}

[data-theme="dark"] .kpi-chip {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .kpi-chip:hover {
    border-color: var(--accent) !important;
}

[data-theme="dark"] .kpi-label {
    color: var(--text-faint);
}

[data-theme="dark"] .kpi-value {
    color: var(--text);
}

[data-theme="dark"] .kpi-sub {
    color: var(--text-soft);
}

/* Responsive: mobile shows chips as 2 columns, desktop as 4 */
@media (max-width: 480px) {
    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .kpi-label {
        font-size: 10px;
    }
    .kpi-value {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kpi-strip {
        grid-template-columns: repeat(4, 1fr);
    }
}
