* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
:root {
    --primary-green: #10B981;
    --light-green: #D1FAE5;
    --orange-warning: #F97316;
    --red-error: #EF4444;
    --blue-info: #3B82F6;
}
body { background-color: #F9FAFB; }
.nav-item.active { 
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669; 
    border-left: 3px solid var(--primary-green);
    font-weight: 600;
}
.nav-item.active svg { color: #059669; }
.nav-item:hover { 
    background-color: rgba(249, 250, 251, 0.8);
    transform: translateX(2px);
}
.nav-item { transition: all 0.2s ease; }
/* Smooth scroll */
html { scroll-behavior: smooth; }
/* Enhanced focus states */
*:focus-visible { outline: 2px solid var(--primary-green); outline-offset: 2px; }
/* Loading states */
.loading { opacity: 0.6; pointer-events: none; }
/* Card animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out; }
.badge { 
    display: inline-flex; 
    align-items: center; 
    padding: 0.25rem 0.75rem; 
    border-radius: 9999px; 
    font-size: 0.75rem; 
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.badge-success { background-color: var(--light-green); color: #065F46; }
.badge-warning { background-color: #FED7AA; color: #9A3412; }
.badge-info { background-color: #DBEAFE; color: #1E40AF; }
.badge-danger { background-color: #FEE2E2; color: #991B1B; }
.analytics-caret { transition: transform 0.2s; }
.analytics-nav-group.expanded .analytics-caret { transform: rotate(90deg); }
.analytics-subnav-item.active { 
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669; 
    font-weight: 600;
}
.project-selector { 
    transition: all 0.2s; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.project-selector:hover { 
    background-color: #F9FAFB; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}
.help-illustration { opacity: 0.8; }
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}
.map-marker-pulse::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Enhanced card styles */
.card { 
    background: white; 
    border-radius: 1rem; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.card:hover { 
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}
/* Vibrant metric card gradients */
.metric-card-gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.metric-card-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.metric-card-gradient-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.metric-card-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.metric-card-gradient-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}
.metric-card-gradient-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}
/* Enhanced shadows */
.shadow-vibrant {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.shadow-vibrant-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
/* Premium shadow utilities */
.shadow-premium {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.shadow-premium-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.shadow-premium-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.shadow-premium-green {
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.25), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}
.shadow-premium-green-lg {
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.3), 0 10px 15px -5px rgba(16, 185, 129, 0.15);
}
/* Colorful chart backgrounds */
.chart-container-vibrant {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.95));
    border-radius: 0.75rem;
}
/* Table row hover effects */
.table-row-hover:hover {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
    transition: all 0.2s ease;
}
/* Badge enhancements */
.badge-vibrant {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}
/* Loading skeleton */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}
/* Account dropdown arrow rotation */
#accountDropdownArrow {
    transition: transform 0.3s ease;
}
#accountDropdownArrow.rotate-180 {
    transform: rotate(180deg);
}
/* Toggle filter active state styles */
.filter-toggle-btn.active {
    border-color: #10B981 !important;
    background-color: #ECFDF5 !important;
}
.filter-toggle-btn.active .toggle-switch {
    background-color: #10B981 !important;
}
.filter-toggle-btn.active .toggle-slider {
    transform: translateX(1rem) !important;
}
.toggle-switch {
    transition: background-color 0.3s ease;
}
.toggle-slider {
    transition: transform 0.3s ease;
}
/* Select dropdown arrow rotation */
.filter-select-btn svg.rotate-180 {
    transform: rotate(180deg);
}
/* Sidebar collapsed state styles */
#sidebar.sidebar-collapsed {
    width: 4rem !important; /* 64px */
}
#sidebar.sidebar-collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.3s ease, width 0.3s ease;
}
#sidebar.sidebar-expanded .sidebar-text {
    opacity: 1;
    width: auto;
    transition: opacity 0.3s ease, width 0.3s ease;
}
#sidebar.sidebar-collapsed .sidebar-project-selector,
#sidebar.sidebar-collapsed .sidebar-onboarding,
#sidebar.sidebar-collapsed .sidebar-subnav,
#sidebar.sidebar-collapsed .analytics-subnav {
    display: none !important;
}
#sidebar.sidebar-collapsed .nav-item {
    justify-content: center !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}
#sidebar.sidebar-collapsed .analytics-nav-group .analytics-caret {
    display: none;
}
#sidebar.sidebar-collapsed .badge {
    display: none;
}
#sidebar.sidebar-collapsed .sidebar-logo {
    justify-content: center;
}
#sidebar.sidebar-collapsed #accountDropdownTrigger > div {
    justify-content: center;
}
#sidebar.sidebar-collapsed #accountDropdownArrow {
    display: none;
}
/* Tooltip for collapsed sidebar items */
#sidebar.sidebar-collapsed {
    overflow-x: visible !important;
    overflow-y: auto;
}
#sidebar.sidebar-collapsed .nav-item {
    position: relative;
    z-index: 1;
    min-height: 2.5rem !important; /* Ensure minimum height for easier hover */
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}
#sidebar.sidebar-collapsed .nav-item:hover {
    z-index: 10000;
}
/* Increase hover area for collapsed sidebar items - invisible padding */
#sidebar.sidebar-collapsed .nav-item::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    z-index: -1;
    background: transparent;
}
/* Sidebar tooltip - using actual element */
.sidebar-tooltip {
    position: fixed;
    padding: 0.5rem 0.75rem;
    background-color: #1F2937;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 99999 !important;
    pointer-events: auto; /* Allow hover on tooltip */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 4px; /* Small gap from sidebar */
}
.sidebar-tooltip.show {
    opacity: 1;
}
.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1F2937;
    pointer-events: none;
}
/* Smooth transitions for sidebar width */
#sidebar {
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out;
}
/* Dropdown positioning when sidebar is collapsed */
#sidebar.sidebar-collapsed .website-dropdown {
    left: 100% !important;
    right: auto !important;
    margin-left: 0.5rem;
    width: 16rem;
}
/* Account dropdown container - ensure overflow visible when collapsed */
#sidebar.sidebar-collapsed .account-dropdown-container {
    overflow: visible !important;
    position: relative;
    z-index: 10001;
}
/* Account dropdown positioning when sidebar is collapsed - handled by JS */
#sidebar.sidebar-collapsed .account-dropdown {
    z-index: 10002 !important;
}
/* Dropdown arrow pointing down when above trigger */
.account-dropdown.dropdown-above .dropdown-arrow.arrow-bottom {
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    z-index: 1;
}
.account-dropdown.dropdown-above::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 19px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #E5E7EB;
    z-index: 0;
}
/* Dropdown arrow pointing up when below trigger */
.account-dropdown.dropdown-below .dropdown-arrow.arrow-top {
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    z-index: 1;
}
.account-dropdown.dropdown-below::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 19px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #E5E7EB;
    z-index: 0;
}
#sidebar.sidebar-collapsed #accountDropdownTrigger {
    position: relative;
    z-index: 1;
}
/* Custom sidebar-collapsed variant utilities */
/* These work like Tailwind variants: sidebar-collapsed:gap-0 */
#sidebar.sidebar-collapsed .sidebar-collapsed\:gap-0 { gap: 0 !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:gap-1 { gap: 0.25rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:gap-2 { gap: 0.5rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:gap-3 { gap: 0.75rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:gap-4 { gap: 1rem !important; }

#sidebar.sidebar-collapsed .sidebar-collapsed\:hidden { display: none !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:block { display: block !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:flex { display: flex !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:inline-flex { display: inline-flex !important; }

#sidebar.sidebar-collapsed .sidebar-collapsed\:justify-center { justify-content: center !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:justify-start { justify-content: flex-start !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:items-center { align-items: center !important; }

#sidebar.sidebar-collapsed .sidebar-collapsed\:p-0 { padding: 0 !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:p-1 { padding: 0.25rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:p-2 { padding: 0.5rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:p-3 { padding: 0.75rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }

#sidebar.sidebar-collapsed .sidebar-collapsed\:w-full { width: 100% !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:w-auto { width: auto !important; }

#sidebar.sidebar-collapsed .sidebar-collapsed\:opacity-0 { opacity: 0 !important; }
#sidebar.sidebar-collapsed .sidebar-collapsed\:opacity-100 { opacity: 1 !important; }

#sidebar.sidebar-collapsed .sidebar-collapsed\:overflow-hidden { overflow: hidden !important; }

/* Expanded state variants */
#sidebar.sidebar-expanded .sidebar-expanded\:gap-0 { gap: 0 !important; }
#sidebar.sidebar-expanded .sidebar-expanded\:gap-3 { gap: 0.75rem !important; }
#sidebar.sidebar-expanded .sidebar-expanded\:hidden { display: none !important; }
#sidebar.sidebar-expanded .sidebar-expanded\:block { display: block !important; }
#sidebar.sidebar-expanded .sidebar-expanded\:flex { display: flex !important; }
