/* Unified Sidebar Styles for All Pages */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 4px 16px rgba(0,0,0,0.1);
    --hover-shadow: 0 8px 24px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --sidebar-mini-width: 70px;
    --sidebar-expanded-width: 280px;
}

/* MANDATORY DISPLAY RULE: UNIFIED SIDEBAR ALWAYS VISIBLE ON DESKTOP */
/* WARNING: Any changes to these rules must be approved by user first */
/* Desktop unified sidebar must always be visible at min-width: 769px */
/* EXCEPTION: Hidden on authentication pages to prevent Samsung login conflicts */

@media (min-width: 769px) {
    .unified-sidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 1050 !important; /* Reduced from 9999 to prevent blocking mobile interactions */
        width: var(--sidebar-mini-width);
    }
    
    /* Allow expansion when explicitly expanded */
    .unified-sidebar.expanded {
        width: var(--sidebar-expanded-width) !important;
    }
    
    /* Hide sidebar on authentication pages to prevent Samsung conflicts */
    body.auth-page .unified-sidebar,
    body.login-page .unified-sidebar,
    body.register-page .unified-sidebar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Remove body offset on authentication pages */
    body.auth-page,
    body.login-page,
    body.register-page {
        margin-left: 0 !important;
    }
    
    /* Body offset for sidebar space (except auth pages) */
    body:not(.auth-page):not(.login-page):not(.register-page) {
        margin-left: var(--sidebar-mini-width) !important;
    }
    
    /* Main content offset when sidebar is present - .container-fluid managed in custom.css */
    .main-content,
    .container {
        margin-left: 0 !important;
        padding-left: 15px !important;
    }
}

/* Global Z-Index Management - MOBILE DISABLED to prevent blocking */
@media (min-width: 769px) {
    /* Base sidebar container */
    .unified-sidebar {
        z-index: 1050 !important;
    }
    
    /* Expanded panel should be above the mini sidebar */
    .unified-sidebar.expanded {
        z-index: 1051 !important;
    }
    
    /* Sidebar content and children inherit parent z-index */
    .unified-sidebar *,
    .unified-resource-viewer,
    .unified-resource-viewer * {
        position: relative;
        z-index: inherit;
    }
    
    /* Specific high-priority elements */
    .sidebar-toggle {
        z-index: 1052 !important;
    }
}

/* MOBILE: COMPREHENSIVE SIDEBAR HIDING - ALL ELEMENTS REMOVED ON MOBILE */
@media (max-width: 768px) {
    /* CRITICAL: Completely hide unified sidebar container and all children */
    .unified-sidebar,
    #unifiedSidebar,
    .unified-sidebar *,
    .unified-sidebar-container,
    .sidebar-mini,
    .sidebar-expanded,
    .desktop-sidebar,
    .unified-resource-viewer,
    #unifiedResourceViewer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
        z-index: -99999 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        transform: translateX(-100vw) !important;
    }
    
    /* Hide all overlay and backdrop elements */
    .sidebar-overlay,
    .sidebar-backdrop,
    .unified-sidebar-overlay,
    .desktop-sidebar-overlay,
    [class*="sidebar"][class*="overlay"],
    [class*="unified"][class*="overlay"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: -99999 !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
    }
    
    /* Remove body margin/padding adjustments for sidebar */
    body {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    /* Remove body classes that affect mobile layout */
    body.has-unified-sidebar,
    body.has-desktop-sidebar,
    body.sidebar-expanded {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    /* Ensure main content uses full width on mobile */
    .main-content,
    .container,
    .container-fluid {
        margin-left: 0 !important;
        padding-left: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Hide toggle buttons and sidebar controls */
    .sidebar-toggle,
    .unified-sidebar-toggle,
    .desktop-sidebar-toggle,
    [data-toggle="sidebar"],
    [class*="sidebar"][class*="toggle"] {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Ensure main content doesn't interfere */
.main-content,
.container,
.container-fluid,
iframe,
video,
canvas,
.modal,
.dropdown-menu,
.tooltip,
.popover {
    z-index: 1 !important;
    position: relative;
}

/* Unified Sidebar Styles */
.unified-sidebar {
    width: var(--sidebar-mini-width);
    background: white;
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1050; /* Base level for mini sidebar */
    transition: width 0.3s ease, z-index 0s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    overflow-x: hidden;
}

/* Base expanded state - will be overridden by media query above */
.unified-sidebar.expanded {
    width: var(--sidebar-expanded-width);
    z-index: 1051; /* Ensures expanded panel is above mini sidebar */
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: white;
    color: #333;
    height: 70px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    position: relative;
    flex-shrink: 0;
}

.sidebar-logo:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.sidebar-logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.unified-sidebar.expanded .sidebar-logo-img {
    height: 32px;
    width: 32px;
    max-width: 32px;
    object-fit: contain;
}

.sidebar-title {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.unified-sidebar.expanded .sidebar-title {
    opacity: 1;
}

.unified-sidebar.expanded .sidebar-logo {
    opacity: 1;
}

.sidebar-toggle {
    color: #333 !important;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    position: relative !important;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(0,0,0,0.1);
}

.sidebar-content {
    padding: 0.5rem 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.unified-sidebar.expanded .sidebar-section-title {
    opacity: 1;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu li:last-child {
    margin-bottom: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    cursor: pointer;
    position: relative;
}

.sidebar-link:hover {
    background: #f8fafc;
    color: #667eea;
    text-decoration: none;
    border-left-color: #667eea;
}

.sidebar-link.active {
    background: #f1f5f9;
    color: #667eea;
    border-left-color: #667eea;
}

.sidebar-link i {
    margin-right: 0.75rem;
    width: 20px;
    font-size: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link-text {
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.unified-sidebar.expanded .sidebar-link-text {
    opacity: 1;
}

/* Tooltip for mini sidebar */
.sidebar-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-left: 0.5rem;
    z-index: 10001;
}

.unified-sidebar:not(.expanded) .sidebar-link:hover::after {
    opacity: 1;
}

/* Collapsible Sidebar Submenu Styles */
.sidebar-collapsible {
    position: relative;
}

.collapsible-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collapsible-arrow {
    transition: transform 0.3s ease;
    margin-left: auto;
    opacity: 0;
    font-size: 0.8rem;
}

.unified-sidebar.expanded .collapsible-arrow {
    opacity: 1;
}

.sidebar-collapsible.open .collapsible-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
}

.sidebar-collapsible.open .sidebar-submenu {
    max-height: 300px;
}

.sidebar-sublink {
    padding: 0.75rem 1rem 0.75rem 2rem !important;
    font-size: 0.875rem;
    color: #64748b;
    border-left: none;
    margin: 0;
}

.sidebar-sublink:hover {
    background: #e2e8f0;
    color: #475569;
}

.sidebar-sublink i {
    font-size: 0.875rem;
    color: #94a3b8;
}

.sidebar-sublink:hover i {
    color: #475569;
}

/* Hide submenu in mini sidebar */
.unified-sidebar:not(.expanded) .sidebar-submenu {
    display: none;
}

.unified-sidebar:not(.expanded) .collapsible-arrow {
    display: none;
}

/* Resource Viewer Styles */
.unified-resource-viewer {
    width: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    transition: width 0.3s ease;
    overflow: hidden;
    position: fixed;
    left: var(--sidebar-mini-width);
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 1049; /* Reduced from 9998 to prevent blocking mobile interactions */
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.unified-sidebar.expanded + .unified-resource-viewer {
    left: var(--sidebar-expanded-width);
}

.unified-resource-viewer.active {
    width: 320px;
}

.resource-viewer-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-viewer-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.close-viewer-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.close-viewer-btn:hover {
    background: rgba(255,255,255,0.1);
}

.resource-viewer-content {
    padding: 1rem;
    height: calc(100% - 60px);
    overflow-y: auto;
}

.resource-item {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resource-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.resource-item-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.resource-item-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.resource-item-preview {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
}

/* Loading Overlay */
.unified-loading-overlay {
    position: fixed;
    top: 60px;
    left: var(--sidebar-mini-width);
    width: 320px;
    height: calc(100vh - 60px);
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.unified-sidebar.expanded + .unified-resource-viewer + .unified-loading-overlay {
    left: var(--sidebar-expanded-width);
}

.unified-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #64748b;
    font-size: 0.9rem;
}

/* Settings Content Styles in Resource Viewer */
.settings-content {
    padding: 0;
}

.unified-settings-section {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.unified-settings-section:last-child {
    border-bottom: none;
}

.unified-settings-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.unified-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.unified-setting-item span {
    color: #64748b;
    flex: 1;
}

.unified-setting-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-setting-btn.primary {
    background: var(--primary-gradient);
    color: white;
}

.unified-setting-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
}

.unified-setting-btn.danger {
    background: #fee2e2;
    color: #dc2626;
}

.unified-setting-btn:hover.primary {
    opacity: 0.9;
}

.unified-setting-btn:hover.secondary {
    background: #e2e8f0;
}

/* Profile Content Styles */
.profile-content {
    padding: 0;
}

.profile-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.profile-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.profile-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.profile-menu {
    padding: 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.9rem;
    color: #374151;
}

.profile-menu-item:hover {
    background: #f8fafc;
    color: #667eea;
}

.profile-menu-item.logout {
    color: #dc2626;
    border-top: 1px solid #f1f5f9;
}

.profile-menu-item.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.profile-menu-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

/* Notifications Content Styles */
.notifications-content {
    padding: 0;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: #f8fafc;
}

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

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.notification-text p {
    margin: 0 0 0.25rem 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.notification-text span {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Settings Content Styles */
.settings-content {
    padding: 0;
}

.settings-section {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h6 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #374151;
}

.settings-item:hover {
    color: #667eea;
    transform: translateX(2px);
}

.settings-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.unified-setting-btn:hover.danger {
    background: #fecaca;
}

/* Toggle Switch Styles */
.unified-toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    cursor: pointer;
}

.unified-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.unified-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 20px;
}

.unified-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.unified-toggle-switch input:checked + .unified-slider {
    background: var(--primary-gradient);
}

.unified-toggle-switch input:checked + .unified-slider:before {
    transform: translateX(20px);
}

/* Content Area Adjustments */
body.has-unified-sidebar {
    margin-left: var(--sidebar-mini-width);
    transition: margin-left 0.3s ease;
}

body.has-unified-sidebar.sidebar-expanded {
    margin-left: var(--sidebar-expanded-width);
}

body.has-unified-sidebar.viewer-open {
    margin-left: calc(var(--sidebar-mini-width) + 320px);
}

body.has-unified-sidebar.sidebar-expanded.viewer-open {
    margin-left: calc(var(--sidebar-expanded-width) + 320px);
}

/* Page Content Adjustments */
.page-content {
    min-height: calc(100vh - 60px);
    padding: 2rem;
}

/* Mobile Responsive - Remove this conflicting rule that hides sidebar */
/* REMOVED: This was conflicting with the mobile sidebar functionality below */

/* Canva-Style Mobile Experience */

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .unified-sidebar {
        width: 80px;
    }
    
    .unified-sidebar.expanded {
        width: 300px;
    }
    
    .unified-resource-viewer.active {
        width: 400px;
        height: calc(100vh - 20px);
        top: 10px;
        border-radius: 12px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sidebar-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Specific Page Adjustments */
.policy-generator-container,
.financial-assessment-container,
.providers-container {
    transition: margin-left 0.3s ease;
}

/* Hide original page navigation when sidebar is present */
body.has-unified-sidebar .original-navigation {
    display: none;
}

/* Ensure main content doesn't overlap with sidebar */
body.has-unified-sidebar main,
body.has-unified-sidebar .container,
body.has-unified-sidebar .main-content {
    box-sizing: border-box;
    width: 100%;
}

/* Notifications and Profile Styles */
.sidebar-user-section {
    margin-top: auto;
    padding-top: 1rem;
}

.notifications-link {
    position: relative;
}

.notification-icon-wrapper {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid white;
}

.profile-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.profile-avatar.large {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

.avatar-initials {
    text-transform: uppercase;
}

.profile-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.profile-link.active .profile-arrow {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1002;
    margin-bottom: 0.5rem;
    min-width: 280px;
    overflow: hidden;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: #64748b;
    font-size: 0.875rem;
}

.profile-dropdown-menu {
    padding: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    color: #64748b;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.logout-item {
    color: #dc2626;
}

.logout-item:hover {
    background: #fee2e2;
    color: #dc2626;
}

.logout-item i {
    color: #dc2626;
}

/* Sidebar adjustments for user section */
.unified-sidebar:not(.expanded) .profile-dropdown {
    left: 70px;
    bottom: 0;
    min-width: 320px;
}

/* Hide profile text when collapsed */
.unified-sidebar:not(.expanded) .profile-link .sidebar-link-text {
    display: none;
}

.unified-sidebar:not(.expanded) .profile-arrow {
    display: none;
}

/* Profile Navigation Section Styles */
.profile-navigation-section {
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    border-radius: 0;
}

.profile-header-expanded {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-header-expanded .profile-info .profile-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.profile-header-expanded .profile-info .profile-email {
    color: white;
    opacity: 0.9;
    font-size: 0.875rem;
}

.profile-navigation-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.profile-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.profile-nav-item i {
    width: 18px;
    font-size: 0.875rem;
    opacity: 0.9;
}

.theme-toggle-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.theme-item {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.theme-buttons {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem;
}

.theme-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.logout-section {
    margin-top: 1rem;
}

.logout-item {
    color: #fee2e2 !important;
    font-weight: 500;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fee2e2 !important;
}

.logout-item i {
    color: #fca5a5;
}

/* Profile Mode Styles */
.unified-sidebar.profile-mode {
    width: var(--sidebar-expanded-width);
}

.unified-sidebar.profile-mode .sidebar-section:not(.profile-navigation-section) {
    display: none;
}

.unified-sidebar.profile-mode .profile-navigation-section {
    display: block !important;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

/* Provider submenu styles */
.provider-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 1rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.provider-submenu .submenu-item {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.provider-submenu .submenu-item:hover {
    background-color: #f3f4f6;
}

.provider-submenu .submenu-item i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.provider-submenu .submenu-item .sidebar-link-text {
    font-size: 0.85rem;
    color: #6b7280;
}

.provider-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.provider-menu-arrow {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Mobile Responsive: COMPLETELY DISABLED - unified sidebar blocked mobile interface */
@media (max-width: 768px) {
    .unified-sidebar,
    .unified-sidebar.active,
    .unified-sidebar.mobile-active {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        z-index: -9999 !important;
        pointer-events: none !important;
        position: static !important;
        left: -9999px !important;
        top: -9999px !important;
        transform: none !important;
        transition: none !important;
    }
    
    .unified-resource-viewer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        z-index: -1 !important;
    }
    
    /* COMPLETELY DISABLED ALL OVERLAY SYSTEMS TO PREVENT MOBILE BLOCKING */
    .sidebar-overlay,
    .sidebar-backdrop,
    .mobile-overlay,
    .overlay,
    .backdrop {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        background: transparent !important;
        position: static !important;
        z-index: -999 !important;
    }
    
    /* KILL ALL ACTIVE OVERLAY STATES */
    .sidebar-overlay.active,
    .sidebar-backdrop.active,
    .mobile-overlay.active,
    .overlay.active,
    .backdrop.active {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        background: transparent !important;
        z-index: -999 !important;
    }
    
    /* Remove sidebar spacing on mobile */
    body.has-unified-sidebar {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    body.has-unified-sidebar main,
    body.has-unified-sidebar .container,
    body.has-unified-sidebar .main-content {
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
}