/* Search Bar Styles */
.table-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}


.filter-select {
    width: 200px;
    margin-left: 10px;
}

/* Product Management Specific Overrides */
#products-tab .table-header-actions {
    justify-content: space-between;
}

#products-tab .search-container {
    width: auto;
    flex-grow: 1;
    margin-right: 15px;
}

#products-tab .filter-select {
    width: 150px;
}


@media (max-width: 768px) {
    .table-header-actions {
        flex-direction: column;
        gap: 10px;
    }

    .search-container {
        width: 100%;
    }

    .filter-select {
        width: 100%;
        margin-left: 0;
    }
}

/* Custom Searchable Dropdown Styles */
.custom-searchable-dropdown {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-searchable-dropdown .dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-searchable-dropdown .dropdown-trigger:hover {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.6);
}

.custom-searchable-dropdown.active .dropdown-trigger {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(154, 179, 245, 0.2);
}

.custom-searchable-dropdown .dropdown-trigger .selected-text {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.custom-searchable-dropdown .dropdown-trigger .trigger-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.custom-searchable-dropdown.active .dropdown-trigger .trigger-icon {
    transform: rotate(180deg);
}

.custom-searchable-dropdown .dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
    z-index: 1050;
    overflow: hidden;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-searchable-dropdown .dropdown-search-box {
    position: relative;
    padding: 10px;
    background: #121212;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-searchable-dropdown .dropdown-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.custom-searchable-dropdown .dropdown-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.custom-searchable-dropdown .dropdown-search-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.custom-searchable-dropdown .dropdown-options-list {
    max-height: 220px;
    overflow-y: auto;
}

.custom-searchable-dropdown .dropdown-option {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.custom-searchable-dropdown .dropdown-option:last-child {
    border-bottom: none;
}

.custom-searchable-dropdown .dropdown-option:hover {
    background: rgba(154, 179, 245, 0.12);
}

.custom-searchable-dropdown .dropdown-option.selected {
    background: rgba(154, 179, 245, 0.2);
    border-left: 3px solid var(--accent-color);
}

.custom-searchable-dropdown .dropdown-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-searchable-dropdown .dropdown-option-name {
    font-weight: 500;
    color: white;
    font-size: 0.92rem;
}

.custom-searchable-dropdown .dropdown-option-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.custom-searchable-dropdown .dropdown-option-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(154, 179, 245, 0.12);
    color: var(--accent-color);
    white-space: nowrap;
    margin-left: 10px;
}

.custom-searchable-dropdown .dropdown-loading,
.custom-searchable-dropdown .dropdown-empty {
    padding: 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.user-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(154, 179, 245, 0.12);
    border: 1px solid rgba(154, 179, 245, 0.3);
    border-radius: 6px;
    color: var(--accent-color);
    font-size: 0.82rem;
    margin-top: 6px;
}