/* Enhanced Navigation Bar with Grouped Links */
/* Modern design v2.0 - Consistent with Hangout */

.sidebar-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height - accounts for mobile browser chrome */
    width: 240px;
    background: var(--surface, #ffffff);
    border-right: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    z-index: 1000;
    transition: transform var(--duration-slow, 300ms) var(--ease, cubic-bezier(0.4, 0, 0.2, 1));
    overflow: hidden; /* Children handle their own scrolling */
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.sidebar-enhanced .sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* Organization Header */
.sidebar-enhanced .sidebar-header {
    padding: 1rem 0.875rem;
    border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    background: var(--background-secondary, #f8fafc);
    overflow: visible;
}

.sidebar-enhanced .organization-logo-container {
    width: 36px;
    height: 36px;
    margin-bottom: 0.625rem;
}

.sidebar-enhanced .organization-logo,
.sidebar-enhanced .organization-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary, linear-gradient(135deg, #9333ea 0%, #7c3aed 100%));
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.sidebar-enhanced .organization-name {
    color: var(--text-primary, #0f172a);
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* Navigation Menu */
.sidebar-enhanced .sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0; /* Allow flex child to shrink below content height */
}

/* Navigation Groups */
.nav-group {
    margin-bottom: 1.25rem;
}

.nav-group-header {
    color: var(--text-tertiary, #94a3b8);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.875rem 0.5rem 0.875rem;
    border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.04));
    margin-bottom: 0.5rem;
}

/* Navigation Items */
.nav-item {
    display: block;
    position: relative;
    text-decoration: none;
    margin: 0.125rem 0.5rem;
    border-radius: var(--radius-lg, 12px);
    transition: all var(--duration-normal, 200ms) var(--ease, cubic-bezier(0.4, 0, 0.2, 1));
    overflow: hidden;
}

.nav-item-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary, #475569);
    font-weight: 500;
    font-size: 0.8125rem;
    position: relative;
    z-index: 1;
}

.nav-item-content i {
    color: var(--text-tertiary, #94a3b8);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    transition: color var(--duration-fast, 100ms) var(--ease);
}

.nav-item-content span {
    color: inherit;
}

/* Purple accent strip for active items */
.nav-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary, #9333ea);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform var(--duration-normal, 200ms) var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

/* Hover State */
.nav-item:hover {
    background: var(--primary-soft, rgba(147, 51, 234, 0.08));
}

.nav-item:hover .nav-item-content {
    color: var(--primary, #9333ea);
}

.nav-item:hover .nav-item-content i {
    color: var(--primary, #9333ea);
}

/* Active State */
.nav-item.active {
    background: var(--primary-soft, rgba(147, 51, 234, 0.1));
}

.nav-item.active .nav-accent {
    transform: scaleY(1);
}

.nav-item.active .nav-item-content {
    color: var(--primary, #9333ea);
    font-weight: 600;
}

.nav-item.active .nav-item-content i {
    color: var(--primary, #9333ea);
}

/* User Profile Section */
.sidebar-enhanced .sidebar-user {
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--background-secondary, #f8fafc);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar-enhanced .user-profile {
    display: flex;
    align-items: center;
    flex: 1;
}

.sidebar-enhanced .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full, 9999px);
    background: var(--gradient-primary, linear-gradient(135deg, #9333ea 0%, #7c3aed 100%));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-enhanced .user-info {
    flex: 1;
    min-width: 0;
    margin-left: 10px;
}

.sidebar-enhanced .user-name {
    color: var(--text-primary, #0f172a);
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-enhanced .user-email {
    color: var(--text-tertiary, #94a3b8);
    font-size: 0.6875rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.sidebar-enhanced .user-actions {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.sidebar-enhanced .user-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.625rem;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    border-radius: var(--radius-md, 8px);
    font-size: 0.6875rem;
    font-weight: 500;
    transition: all var(--duration-fast, 100ms) var(--ease);
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.sidebar-enhanced .user-action-btn i {
    margin-right: 0.375rem;
    color: var(--text-tertiary, #94a3b8);
}

.sidebar-enhanced .user-action-btn:hover {
    background: var(--primary-soft, rgba(147, 51, 234, 0.1));
    color: var(--primary, #9333ea);
    border-color: var(--primary, #9333ea);
}

.sidebar-enhanced .user-action-btn:hover i {
    color: var(--primary, #9333ea);
}

.sidebar-enhanced .user-action-btn.logout:hover {
    background: var(--danger-soft, rgba(239, 68, 68, 0.1));
    color: var(--danger, #ef4444);
    border-color: var(--danger, #ef4444);
}

.sidebar-enhanced .user-action-btn.logout:hover i {
    color: var(--danger, #ef4444);
}

/* Sidebar Overlay - Desktop Safety */
.sidebar-overlay {
    pointer-events: none !important; /* Default: never block clicks on desktop */
    display: none !important; /* Default: hide on desktop */
}

/* Mobile Responsive — max-width: 767px to avoid overlap with tablet (768px+) */
@media (max-width: 767px) {
    .sidebar-enhanced {
        transform: translateX(-100%);
        width: 100%;
        max-width: 320px;
    }

    .sidebar-enhanced.open {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-overlay {
        position: fixed !important;
        display: block !important; /* Allow display on mobile */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none !important;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto !important;
    }
}

/* Mobile Top Bar */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1001; /* Must be above sidebar (1000) and overlay (999) */
    align-items: center;
    padding: 0 1rem;
    color: var(--nav-text);
    box-shadow: var(--nav-shadow);
}

.mobile-sidebar-toggle {
    background: none;
    border: none;
    color: var(--nav-toggle-text);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;          /* remove 300ms tap delay */
    min-width: 44px;                     /* WCAG touch target */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-brand {
    flex: 1;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--nav-text);
}

.mobile-user {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--nav-item-active-text);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Mobile Sidebar Close Button */
.mobile-sidebar-close {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-bottom: 1px solid var(--nav-border);
}

.mobile-close-btn {
    background: none;
    border: none;
    color: var(--nav-close-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: var(--nav-close-hover-bg);
    color: var(--nav-close-hover-text);
}

@media (max-width: 767px) {
    .sidebar-enhanced {
        transform: translateX(-100%);
    }

    .sidebar-enhanced.open {
        transform: translateX(0);
    }

    .mobile-topbar {
        display: flex;
    }

    #main-content {
        padding-top: 60px;
    }
}

/* Main content adjustment for enhanced sidebar */
@media (min-width: 768px) {
    #main-content {
        margin-left: 240px;
    }
    
    /* Completely disable overlay on desktop - ensure it never blocks buttons */
    .sidebar-overlay {
        display: none !important;
        pointer-events: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1000 !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
    }
}

/* Scrollbar Styling for Light Theme */
.sidebar-enhanced::-webkit-scrollbar {
    width: 6px;
}

.sidebar-enhanced::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}

.sidebar-enhanced::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.sidebar-enhanced::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Ensure excellent contrast throughout */
.sidebar-enhanced * {
    color: inherit;
}

/* Override any conflicting styles */
.sidebar-enhanced .nav-item:visited,
.sidebar-enhanced .nav-item:link {
    color: inherit;
}

.sidebar-enhanced .nav-item:visited .nav-item-content,
.sidebar-enhanced .nav-item:link .nav-item-content {
    color: var(--nav-item-text);
}

.sidebar-enhanced .nav-item.active:visited .nav-item-content,
.sidebar-enhanced .nav-item.active:link .nav-item-content {
    color: var(--nav-item-active-text);
}

/* CRITICAL OVERRIDE: Force horizontal user panel layout - High specificity to override conflicts */
.sidebar-enhanced .sidebar-user,
nav.sidebar-enhanced .sidebar-user {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
}

.sidebar-enhanced .user-profile,
nav.sidebar-enhanced .user-profile {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    margin-bottom: 0 !important;
}

.sidebar-enhanced .user-info,
nav.sidebar-enhanced .user-info {
    margin-left: 10px !important;
}

.sidebar-enhanced .user-actions,
nav.sidebar-enhanced .user-actions {
    display: flex !important;
    gap: 0.5rem !important;
    margin-bottom: 0 !important;
}

/* Notification Bell & Dropdown */
.mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--notification-bell-text);
    transition: color 0.2s ease;
}

.notification-bell:hover {
    color: var(--notification-bell-hover);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--notification-badge-bg);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 1.125rem;
    text-align: center;
    line-height: 1;
}

.notification-badge-sidebar {
    background: var(--notification-badge-bg);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: auto;
    min-width: 1.25rem;
    text-align: center;
}

.notification-dropdown {
    position: fixed;
    top: 60px;
    right: 1rem;
    width: 380px;
    max-width: calc(100vw - 2rem);
    background: var(--dropdown-bg);
    border-radius: 12px;
    box-shadow: var(--dropdown-shadow);
    z-index: 9999;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dropdown-border);
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dropdown-header-text);
}

.view-all-link {
    font-size: 0.875rem;
    color: var(--dropdown-link-text);
    text-decoration: none;
    font-weight: 500;
}

.view-all-link:hover {
    color: var(--dropdown-link-hover);
}

.notification-dropdown-body {
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dropdown-border-light);
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
}

.notification-item:hover {
    background-color: var(--dropdown-hover-bg);
}

.notification-item.unread {
    background-color: var(--notification-unread-bg);
}

.notification-item.unread:hover {
    background-color: var(--notification-unread-hover-bg);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--notification-icon-bg);
    color: var(--notification-icon-text);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--notification-title-text);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.813rem;
    color: var(--notification-message-text);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--notification-time-text);
}

.notification-dot {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 8px;
    height: 8px;
    background: var(--notification-dot-bg);
    border-radius: 50%;
}

.notification-empty,
.notification-loading {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--nav-text-muted);
}

.notification-empty i,
.notification-loading i {
    margin-bottom: 0.5rem;
    color: var(--notification-time-text);
}

.notification-empty p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
}

.notification-loading .spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .notification-dropdown {
        width: calc(100vw - 2rem);
        right: 1rem;
    }
}

/* ========================================
   Org Switcher Dropdown
   ======================================== */
.sidebar-enhanced .sidebar-header {
    position: relative;
}

.org-switcher-wrapper {
    width: 100%;
    position: relative;
}

.org-switcher-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    width: 100%;
    text-align: left;
    color: inherit;
    font-family: inherit;
}

.org-switcher-btn .organization-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
}

.org-switcher-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--text-tertiary, #94a3b8);
}

.org-switcher-wrapper.open .org-switcher-chevron {
    transform: rotate(180deg);
}

.org-switcher-dropdown {
    position: fixed;
    left: 0;
    width: 240px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1100;
    max-height: 60vh;
    overflow-y: auto;
    padding-top: 0;
}

/* "All Churches" option stays pinned at top of dropdown */
.org-switcher-dropdown .org-switcher-all-churches {
    position: sticky;
    top: 0;
    background: var(--surface, #ffffff);
    z-index: 1;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

.org-switcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary, #0f172a);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.04));
}

.org-switcher-item:last-child {
    border-bottom: none;
}

.org-switcher-item:hover {
    background: var(--background-secondary, #f8fafc);
    color: var(--text-primary, #0f172a);
    text-decoration: none;
}

.org-switcher-item.active {
    background: rgba(124, 58, 237, 0.06);
    color: var(--accent-color, #7c3aed);
}

.org-item-avatar {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--gradient-primary, linear-gradient(135deg, #9333ea, #7c3aed));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.org-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   Dark Mode Overrides
   ======================================== */
[data-theme="dark"] .sidebar-enhanced {
    background: var(--background-tertiary, #1c1f2e);
    border-right-color: var(--border, #2a2d3a);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .sidebar-enhanced .sidebar-header {
    background: var(--background-secondary, #161822);
    border-bottom-color: var(--border, #2a2d3a);
}

[data-theme="dark"] .sidebar-enhanced .organization-name {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .org-switcher-btn .organization-name {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .org-switcher-chevron {
    color: var(--text-muted, #94a3b8);
}

[data-theme="dark"] .org-switcher-dropdown {
    background: var(--background-tertiary, #1c1f2e);
    border-color: var(--border, #2a2d3a);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

[data-theme="dark"] .org-switcher-dropdown .org-switcher-all-churches {
    background: var(--background-tertiary, #1c1f2e);
    border-bottom-color: var(--border, #2a2d3a);
}

[data-theme="dark"] .org-switcher-item {
    color: var(--text-primary, #f1f5f9);
    border-bottom-color: var(--border, #2a2d3a);
}

[data-theme="dark"] .org-switcher-item:hover {
    background: var(--background-secondary, #161822);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .org-switcher-item.active {
    background: rgba(124, 58, 237, 0.12);
    color: #c4b5fd;
}

[data-theme="dark"] .nav-group-header {
    color: var(--text-muted, #94a3b8);
    border-bottom-color: var(--border, #2a2d3a);
}

[data-theme="dark"] .nav-item-content,
[data-theme="dark"] .sidebar-enhanced .nav-item-content,
[data-theme="dark"] .sidebar-enhanced .nav-item:visited .nav-item-content,
[data-theme="dark"] .sidebar-enhanced .nav-item:link .nav-item-content {
    color: var(--text-secondary, #cbd5e1) !important;
}

[data-theme="dark"] .nav-item-content i {
    color: var(--text-muted, #94a3b8) !important;
}

[data-theme="dark"] .nav-item:hover .nav-item-content,
[data-theme="dark"] .sidebar-enhanced .nav-item:hover .nav-item-content {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-theme="dark"] .nav-item.active .nav-item-content,
[data-theme="dark"] .sidebar-enhanced .nav-item.active:visited .nav-item-content,
[data-theme="dark"] .sidebar-enhanced .nav-item.active:link .nav-item-content {
    color: #c4b5fd !important;
}

[data-theme="dark"] .nav-item:hover {
    background: rgba(147, 51, 234, 0.12);
}

[data-theme="dark"] .nav-item.active {
    background: rgba(147, 51, 234, 0.15);
}

[data-theme="dark"] .sidebar-enhanced .sidebar-user {
    background: var(--background-secondary, #161822);
    border-top-color: var(--border, #2a2d3a);
}

[data-theme="dark"] .sidebar-enhanced .user-name {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .sidebar-enhanced .user-email {
    color: var(--text-muted, #94a3b8);
}

[data-theme="dark"] .sidebar-enhanced .user-action-btn {
    background: var(--background-tertiary, #1c1f2e);
    border-color: var(--border, #2a2d3a);
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .sidebar-enhanced .user-action-btn i {
    color: var(--text-muted, #94a3b8);
}

[data-theme="dark"] .sidebar-enhanced .user-action-btn:hover {
    background: rgba(147, 51, 234, 0.15);
    color: #c4b5fd;
    border-color: rgba(147, 51, 234, 0.3);
}

[data-theme="dark"] .sidebar-enhanced .user-action-btn:hover i {
    color: #c4b5fd;
}

[data-theme="dark"] .sidebar-enhanced .user-action-btn.logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .sidebar-enhanced .user-action-btn.logout:hover i {
    color: #f87171;
}

[data-theme="dark"] .mobile-topbar {
    background: var(--background-tertiary, #1c1f2e);
    border-bottom-color: var(--border, #2a2d3a);
}

[data-theme="dark"] .mobile-brand {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .mobile-sidebar-toggle {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .mobile-close-btn {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .mobile-close-btn:hover {
    background: rgba(147, 51, 234, 0.12);
}

[data-theme="dark"] .mobile-sidebar-close {
    border-bottom-color: var(--border, #2a2d3a);
}

/* Auto dark mode (system preference) */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .sidebar-enhanced {
        background: var(--background-tertiary, #1c1f2e);
        border-right-color: var(--border, #2a2d3a);
        box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    [data-theme="auto"] .sidebar-enhanced .sidebar-header {
        background: var(--background-secondary, #161822);
        border-bottom-color: var(--border, #2a2d3a);
    }
    [data-theme="auto"] .sidebar-enhanced .organization-name { color: var(--text-primary, #f1f5f9); }
    [data-theme="auto"] .org-switcher-btn .organization-name { color: var(--text-primary, #f1f5f9); }
    [data-theme="auto"] .org-switcher-chevron { color: var(--text-muted, #94a3b8); }
    [data-theme="auto"] .org-switcher-dropdown {
        background: var(--background-tertiary, #1c1f2e);
        border-color: var(--border, #2a2d3a);
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
    [data-theme="auto"] .org-switcher-dropdown .org-switcher-all-churches {
        background: var(--background-tertiary, #1c1f2e);
        border-bottom-color: var(--border, #2a2d3a);
    }
    [data-theme="auto"] .org-switcher-item { color: var(--text-primary, #f1f5f9); border-bottom-color: var(--border, #2a2d3a); }
    [data-theme="auto"] .org-switcher-item:hover { background: var(--background-secondary, #161822); color: var(--text-primary, #f1f5f9); }
    [data-theme="auto"] .org-switcher-item.active { background: rgba(124, 58, 237, 0.12); color: #c4b5fd; }
    [data-theme="auto"] .nav-group-header { color: var(--text-muted, #94a3b8); border-bottom-color: var(--border, #2a2d3a); }
    [data-theme="auto"] .nav-item-content,
    [data-theme="auto"] .sidebar-enhanced .nav-item-content,
    [data-theme="auto"] .sidebar-enhanced .nav-item:visited .nav-item-content,
    [data-theme="auto"] .sidebar-enhanced .nav-item:link .nav-item-content { color: var(--text-secondary, #cbd5e1) !important; }
    [data-theme="auto"] .nav-item-content i { color: var(--text-muted, #94a3b8) !important; }
    [data-theme="auto"] .nav-item:hover .nav-item-content,
    [data-theme="auto"] .sidebar-enhanced .nav-item:hover .nav-item-content { color: var(--text-primary, #f1f5f9) !important; }
    [data-theme="auto"] .nav-item.active .nav-item-content,
    [data-theme="auto"] .sidebar-enhanced .nav-item.active:visited .nav-item-content,
    [data-theme="auto"] .sidebar-enhanced .nav-item.active:link .nav-item-content { color: #c4b5fd !important; }
    [data-theme="auto"] .nav-item:hover { background: rgba(147, 51, 234, 0.12); }
    [data-theme="auto"] .nav-item.active { background: rgba(147, 51, 234, 0.15); }
    [data-theme="auto"] .sidebar-enhanced .sidebar-user { background: var(--background-secondary, #161822); border-top-color: var(--border, #2a2d3a); }
    [data-theme="auto"] .sidebar-enhanced .user-name { color: var(--text-primary, #f1f5f9); }
    [data-theme="auto"] .sidebar-enhanced .user-email { color: var(--text-muted, #94a3b8); }
    [data-theme="auto"] .sidebar-enhanced .user-action-btn { background: var(--background-tertiary, #1c1f2e); border-color: var(--border, #2a2d3a); color: var(--text-secondary, #cbd5e1); }
    [data-theme="auto"] .sidebar-enhanced .user-action-btn i { color: var(--text-muted, #94a3b8); }
    [data-theme="auto"] .sidebar-enhanced .user-action-btn:hover { background: rgba(147, 51, 234, 0.15); color: #c4b5fd; border-color: rgba(147, 51, 234, 0.3); }
    [data-theme="auto"] .sidebar-enhanced .user-action-btn:hover i { color: #c4b5fd; }
    [data-theme="auto"] .sidebar-enhanced .user-action-btn.logout:hover { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
    [data-theme="auto"] .sidebar-enhanced .user-action-btn.logout:hover i { color: #f87171; }
    [data-theme="auto"] .mobile-topbar { background: var(--background-tertiary, #1c1f2e); border-bottom-color: var(--border, #2a2d3a); }
    [data-theme="auto"] .mobile-brand { color: var(--text-primary, #f1f5f9); }
    [data-theme="auto"] .mobile-sidebar-toggle { color: var(--text-secondary, #cbd5e1); }
    [data-theme="auto"] .mobile-close-btn { color: var(--text-secondary, #cbd5e1); }
    [data-theme="auto"] .mobile-close-btn:hover { background: rgba(147, 51, 234, 0.12); }
    [data-theme="auto"] .mobile-sidebar-close { border-bottom-color: var(--border, #2a2d3a); }
}

/* Force cache update - v6.0 */