/* Modern UI Color Palette */
:root {
    /* Brand Colors */
    --color-black: #000000;
    --color-soft-black: #1F2937;
    --color-mint: #00FFBC;
    --color-dark-green: #0A2B14;
    --color-dark-gray: #6B7280;
    --color-medium-green: #014E20;
    --color-light-gray: #F9FAFB;
    --color-light-gray-transparent-50: #F1F5F980;
    --color-green: #2E7D32;
    --color-white: #FFFFFF;
    
    /* Modern Color Variables */
    --primary-color: var(--color-green);
    --secondary-color: var(--color-mint);
    --accent-color: #388E3C;
    --text-primary: var(--color-soft-black);
    --text-secondary: var(--color-dark-gray);
    --background-primary: var(--color-white);
    --background-secondary: var(--color-light-gray);
    --border-color: #E5E7EB;
    --hover-color: #F3F4F6;
}

/* Import Modern Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-secondary);
    min-height: calc(100vh + 1px);
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    margin-left: 380px; /* Space for always-present sidebar */
    margin-top: 80px; /* Space for fixed header */
    transition: margin-left 0.3s ease;
}

.container.sidebar-hidden {
    margin-left: 20px;
}

/* Header Bar */
.header-bar {
    background: var(--primary-color);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1004;
    border-bottom: 1px solid var(--accent-color);
}

.header-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 0 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white */
}

.header-title {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1;
}

.header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.header-right {
    width: 200px; /* To balance the header */
}

/* Search Bar in Header */
.search-bar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--background-primary);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
    flex-grow: 1;
    max-width: 600px;
}

.search-bar-wrapper:focus-within {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 40px; /* Right padding for clear button */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.clear-search-btn.hidden {
    display: none;
}

.clear-search-btn:hover {
    color: var(--text-primary);
    transform: translateY(-50%) scale(1.1);
}

.clear-search-btn .icon-size {
    width: 20px;
    height: 20px;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1005;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.search-dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

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

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 65px; /* Height of header bar */
    left: 0;
    width: 360px;
    height: calc(100vh - 65px);
    background: var(--background-primary);
    z-index: 1003;
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.sidebar-hide-icon {
    width: 20px;
    height: 20px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.all-filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

/* Custom Multiselect Dropdown Styling */
.custom-multiselect {
    position: relative;
}

.multiselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-primary);
    cursor: pointer;
    font-size: 0.95rem;
    min-height: 44px;
}

.multiselect-trigger:hover {
    border-color: var(--text-secondary);
}

.custom-multiselect.open .multiselect-trigger {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.multiselect-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multiselect-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.multiselect-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
}

.multiselect-clear:hover {
    color: var(--text-primary);
    background-color: var(--hover-color);
}

.multiselect-clear.hidden {
    display: none;
}

.multiselect-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.custom-multiselect.open .multiselect-arrow {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 250px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.multiselect-search {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.multiselect-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.multiselect-options {
    max-height: 200px;
    overflow-y: auto;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
}

.multiselect-option:hover {
    background-color: var(--hover-color);
}

.multiselect-option.selected {
    background-color: rgba(46, 125, 50, 0.1);
}

.multiselect-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    background-color: var(--background-primary);
}

.multiselect-checkbox.checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.multiselect-checkbox.checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--background-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.clear-filters-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-filters-btn:hover {
    background: var(--accent-color);
}

/* Results Section */
.results-section {
    background: var(--background-primary);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border-color);
    min-height: 500px;
}

.results-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Employee Grid */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Employee Cards */
.employee-card {
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.employee-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.project-manager-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

/* Chip styles */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chip {
    background-color: var(--color-mint);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--);
}

.employee-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.employee-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.employee-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item-icon .icon-size {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.employee-email {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-top: 12px;
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--background-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.load-more-btn:hover {
    background-color: var(--accent-color);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--background-primary);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
}

.employee-header-info .modal-employee-name {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.employee-header-info .modal-business-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 16px;
}

.modal-career-level {
    font-size: .8rem;
    color: var(--color-soft-black);
    font-weight: 400;
}
.modal-email-main {
    font-size: .8rem;
    color: var(--color-soft-black);
    font-weight: 400;
}

.employee-details-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--hover-color);
    transform: scale(1.1);
}

.modal-close .icon-size {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.communities-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.community-item {
    background-color: var(--background-secondary);
    border-radius: 8px;
    padding: 12px 16px;
    background-color: var(--color-light-gray)
}

.community-label {
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.community-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary)
}

.expertise-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.allocation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.allocation-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.allocation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.allocation-name {
    font-weight: 500;
}

.allocation-percentage {
    font-weight: 500;
    color: var(--text-secondary);
}

.allocation-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.allocation-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--background-primary);
    border-radius: 10px;
    margin-top: 30px;
    border: 1px dashed var(--border-color);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.empty-state-image {
    width: 50%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state-message {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.empty-state-button {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--background-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.empty-state-button:hover {
    background-color: var(--accent-color);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.sidebar-show {
    position: fixed;
    top: 76px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.sidebar-show:hover {
    background: var(--accent-color);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.sidebar-show-icon {
    width: 18px;
    height: 18px;
}